Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 8th, 2012  |  syntax: None  |  size: 1.06 KB  |  hits: 6  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.         if(strcmp(cmd, "/money", true) == 0)
  2.         {
  3.             if(IsPlayerConnected(playerid))
  4.             {
  5.                         tmp = strtok(cmdtext, idx);
  6.                         if(!strlen(tmp))
  7.                         {
  8.                                 SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /money [ID Igraca/Dio Imena] [novac]");
  9.                                 return 1;
  10.                         }
  11.                         new playa;
  12.                         new money;
  13.                         playa = ReturnUser(tmp);
  14.                         tmp = strtok(cmdtext, idx);
  15.                         money = strval(tmp);
  16.                         if (PlayerInfo[playerid][pAdmin] >= 1337)
  17.                         {
  18.                             if(IsPlayerConnected(playa))
  19.                             {
  20.                                 if(playa != INVALID_PLAYER_ID)
  21.                                 {
  22.                                                 SafeResetPlayerMoney(playa);
  23.                                                 SafeGivePlayerMoney(playa, money);
  24.                                                 GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  25.                                                 GetPlayerName(playerid, sendername, sizeof(sendername));
  26.                                                 format(string, 256, ""COL_RED"%s {FFFFFF}je podesio "COL_RED"%s {FFFFFF}novac na "COL_RED"$%d.", sendername,giveplayer,money);
  27.                                                 ABroadCast(COLOR_YELLOW,string,1);
  28.                                         }
  29.                                 }
  30.                         }
  31.                         else
  32.                         {
  33.                                 SendClientMessage(playerid, COLOR_GRAD1, "(greska) Niste autorizovani da koristite ovu komandu!");
  34.                         }
  35.                 }
  36.                 return 1;
  37.         }