Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // No topo
- new playerRow[MAX_PLAYERS];
- // No inicio de OnPlayerLoginBPS
- format(string, sizeof (string), "SELECT * FROM `player` WHERE BINARY nome = '%s' LIMIT 1", NomePlayer(playerid));
- mysql_tquery(serverMysql, string, "onLoadPlayerRow", "i", playerid);
- // em qualquer lugar
- serverCallback: onLoadPlayerRow(playerid) {
- playerRow[playerid] = -1;
- if ( cache_get_row_count()) {
- playerRow[playerid] = cache_get_field_content_int(0, "id");
- }
- }
- // Ai em casa UPDATE, você ao invés de colocar "WHERE nome = '%s',
- // voce salva os negocios no ID da row que foi armazenado em OnPlayerLoginBPS
- format(string, sizeof (string), "UPDATE `player` SET `vip_vencimento` = TIMESTAMPADD(MONTH, 1, CURRENT_TIMESTAMP()) WHERE `id` = '%d'", playerRow[playerid]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement