SHARE
TWEET

Untitled

a guest Jan 25th, 2020 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CMD:setstats(playerid, params[])
  2. {
  3.     new  id, option[30], sub_params[128], string[256], amount;
  4.  
  5.     if (GetPlayerData(playerid, Admin) < ServerManager)
  6.         return SendPermissionMessage(playerid);
  7.  
  8.     if (sscanf(params, "us[30]S()[128]", id, option, sub_params))
  9.         return SendUsageMessage(playerid, "/setstats [ID/Ime na igracot] [option]"), SendMessage(playerid, COLOR_GRAY, "[Options] pol | godini | pari | exp | level | phone | number | fskin");
  10.  
  11.     if (!strcmp(option, "pol", true))
  12.     {
  13.         if (sscanf(sub_params, "i", pol))
  14.                 return SendUsageMessage(playerid, "/setstats [ID/Ime na igracot] pol [option]"), SendMessage(playerid, COLOR_GRAY, "[Options] 0 - Masko | 1 - Zensko");
  15.  
  16.         SetCharacter(id, CharacterSlot[id], Gender, pol);
  17.         SaveCharacter(id, CharacterSlot[id], "Gender", ConvertToString(pol));
  18.         SendInfoMessage(playerid, "Go promenivte polot na igracot");
  19.         return true;
  20.     }
  21.     else if (!strcmp(option, "godini", true))
  22.     {
  23.         if (sscanf(sub_params, "i", godini))
  24.                 return SendUsageMessage(playerid, "/setstats [ID/Ime na igracot] godini [amount]");
  25.  
  26.         SetCharacter(id, CharacterSlot[id], Age, godini);
  27.         SaveCharacter(id, CharacterSlot[id], "Age", ConvertToString(godini));
  28.         SendInfoMessage(playerid, "Gi promenivte godinite na igracot");
  29.         return true;
  30.     }
  31.     else if (!strcmp(option, "pari", true))
  32.     {
  33.         if (sscanf(sub_params, "i", pari))
  34.                 return SendUsageMessage(playerid, "/setstats [ID/Ime na igracot] pari [amount]");
  35.  
  36.         SetCharacter(id, CharacterSlot[id], Money, pari);
  37.         SaveCharacter(id, CharacterSlot[id], "Money", ConvertToString(pari));
  38.         SendInfoMessage(playerid, "Gi promenivte parite na igracot");
  39.         return true;
  40.     }
  41.     else if (!strcmp(option, "exp", true))
  42.     {
  43.         if (sscanf(sub_params, "i", exp))
  44.                 return SendUsageMessage(playerid, "/setstats [ID/Ime na igracot] exp [amount]");
  45.  
  46.         SetCharacter(id, CharacterSlot[id], Exp, exp);
  47.         SaveCharacter(id, CharacterSlot[id], "Exp", ConvertToString(exp));
  48.         SendInfoMessage(playerid, "Gi promenivte exp na igracot");
  49.         return true;
  50.     }
  51.     else if (!strcmp(option, "level", true))
  52.     {
  53.         if (sscanf(sub_params, "i", level))
  54.                 return SendUsageMessage(playerid, "/setstats [ID/Ime na igracot] level [amount]");
  55.  
  56.         SetCharacter(id, CharacterSlot[id], Level, level);
  57.         SaveCharacter(id, CharacterSlot[id], "Level", ConvertToString(level));
  58.         SendInfoMessage(playerid, "Go promenivte levelot na igracot");
  59.         return true;
  60.     }
  61.     else if (!strcmp(option, "phone", true))
  62.     {
  63.         if (sscanf(sub_params, "i", phone))
  64.                 return SendUsageMessage(playerid, "/setstats [ID/Ime na igracot] phone [option]"), SendMessage(playerid, COLOR_GRAY, "[Options] 0 - Nema | 1 - Ima");
  65.  
  66.         SetCharacter(id, CharacterSlot[id], hasPhone, phone);
  67.         SaveCharacter(id, CharacterSlot[id], "hasPhone", ConvertToString(phone));
  68.         if(phone == 0)
  69.         {SendInfoMessage(playerid, "Mu go zedovte telefonot na igracot");}
  70.         else
  71.         {SendInfoMessage(playerid, "Mu dadovte telefon na igracot");}
  72.         return true;
  73.     }
  74.     else if (!strcmp(option, "number", true))
  75.     {
  76.         if (sscanf(sub_params, "i", number))
  77.                 return SendUsageMessage(playerid, "/setstats [ID/Ime na igracot] number [amount]");
  78.  
  79.         SetCharacter(id, CharacterSlot[id], Number, number);
  80.         SaveCharacter(id, CharacterSlot[id], "Number", ConvertToString(number));
  81.         SendInfoMessage(playerid, "Go promenivte brojot na igracot");
  82.         return true;
  83.     }
  84.     else if (!strcmp(option, "fskin", true))
  85.     {
  86.         if (sscanf(sub_params, "i", fskin))
  87.                 return SendUsageMessage(playerid, "/setstats [ID/Ime na igracot] fskin [amount]");
  88.  
  89.         SetCharacter(id, CharacterSlot[id], FSkin, fskin);
  90.         SaveCharacter(id, CharacterSlot[id], "FSkin", ConvertToString(fskin));
  91.         SendInfoMessage(playerid, "Go promenivte Faction skinot na igracot");
  92.         return true;
  93.     }
  94.     return true;
  95. }
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