Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock AssignpDane(playerid)
- {
- cache_set_active(pDane[playerid][Cache_ID]); //Ponownie aktywujemy Cache gracza.
- //Pobieramy dane z cache
- cache_get_value_int(0, "uid", pDane[playerid][UID]);
- cache_get_value_int(0, "skinid", pDane[playerid][SkinID]);
- cache_get_value_int(0, "bank", pDane[playerid][wBank]);
- cache_get_value_int(0, "money", pDane[playerid][Money]);
- cache_get_value_int(0, "score", pDane[playerid][Score]);
- cache_get_value_int(0, "plec", pDane[playerid][Plec]);
- cache_get_value_int(0, "wiek", pDane[playerid][Wiek]);
- cache_get_value_int(0, "vip", pDane[playerid][Vip]);
- cache_get_value_int(0, "frakcja", pDane[playerid][Frakcja]);
- cache_delete(pDane[playerid][Cache_ID]); //Usuwa caly Cache
- pDane[playerid][Cache_ID] = MYSQL_INVALID_CACHE; //Resetujemy Cache ID
- return 1;
- }
- stock SaveAccount(playerid)
- {
- new query[258];
- mysql_format(SQL_ID, query, sizeof query, "UPDATE kontagraczy SET bank = %i, money = %i, score = %i, skinid = %i WHERE uid = %i",
- pDane[playerid][wBank],
- GetMoney(playerid),
- GetPlayerScore(playerid),
- GetPlayerSkin(playerid),
- pDane[playerid][UID]);
- mysql_tquery(SQL_ID, query);
- return 1;
- }
- stock CreateAccount(playerid)
- {
- new query[258], string[258];
- strcat(query, "INSERT INTO kontagraczy(");
- //
- strcat(query, "name,");
- strcat(query, "password,");
- strcat(query, "skinid,");
- strcat(query, "bank,");
- strcat(query, "plec,");
- strcat(query, "wiek,");
- strcat(query, "vip,");
- strcat(query, "frakcja,");
- strcat(query, "money");
- //
- strcat(query, ") VALUES (");
- format(string, 258, "'%s',", PlayerName(playerid));
- strcat(query, string);
- format(string, 258, "'%s',", pDane[playerid][Password]);
- strcat(query, string);
- format(string, 258, "'%i',", pDane[playerid][SkinID]);
- strcat(query, string);
- format(string, 258, "'%i',", pDane[playerid][wBank]);
- strcat(query, string);
- format(string, 258, "'%i',", pDane[playerid][Plec]);
- strcat(query, string);
- format(string, 258, "'%i',", pDane[playerid][Wiek]);
- strcat(query, string);
- format(string, 258, "'%i',", pDane[playerid][Vip]);
- strcat(query, string);
- format(string, 258, "'%i',", pDane[playerid][Frakcja]);
- strcat(query, string);
- format(string, 258, "'%i'",START_MONEY);
- strcat(query, string);
- //
- strcat(query, ")");
- mysql_tquery(SQL_ID, query, "OnAccountCreate", "i", playerid);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement