SHARE
TWEET

Untitled

a guest May 21st, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CMD:set(playerid, params[]) {
  2.     new valoare, item[20], userid, id;
  3.     if(PlayerInfo[playerid][pAdmin] < 7) return 1;
  4.     if(sscanf(params, "us[50]i", id, item, valoare))  {
  5.         SCM(playerid, -1, "USAGE: {FFFFFF}/set <full name/id> <item> <amount>");
  6.         SCM(playerid, -1, "Level, Money");
  7.         return 1; }    
  8.     if(!IsPlayerConnected(id)) return SCM(playerid, -1, "Player not connected!");
  9.     new cont = MySQLCheckAccount(id);
  10.     if(cont == 0) return SCM(playerid, -1, "Acest nume nu a fost gasit in baza de date!");
  11.     userid = GetPlayerID(id);
  12.     switch(Y_Hash(item))  {
  13.         case _H<level>: {
  14.             if(userid != INVALID_PLAYER_ID) PlayerInfo[userid][pLevel] = valoare, SetPlayerScore(userid, valoare), UpdateProgress(playerid, 0);
  15.             mysql_format(SQL, string, sizeof(string), "UPDATE users SET Level='%d' WHERE name='%s' LIMIT 1", valoare, id);
  16.             mysql_tquery(SQL, string, "", "");
  17.         }
  18.         case _H<money>: {
  19.             if(userid != INVALID_PLAYER_ID) Cash[userid] = valoare;
  20.             format(query, sizeof(query), "UPDATE users SET Money='%d' WHERE name='%s'", valoare, id);
  21.             mysql_query(SQL, query, "", "");
  22.         }
  23.     }
  24.     return 1;
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top