Guest User

Untitled

a guest
Jun 16th, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. CMD:sms(playerid, params[])
  2. {
  3. if(PlayerInfo[playerid][pTelefon] >= 1)
  4. {
  5. new string[256], string1[256];
  6. new text[256];
  7. new sendername[MAX_PLAYER_NAME];
  8. new guza[MAX_PLAYER_NAME];
  9. new id = -1;
  10. new broj;
  11. if(sscanf(params,"is[256]", broj, text)) return SendClientMessage(playerid, COLOR_ORANGE, "{FFFF00}[LZ] {AFAFAF}Koriscenje | /sms [Ime igraca/ID] [text]");
  12. foreach(Player, i)
  13. {
  14. if(PlayerInfo[i][pBrojmoba] == broj) id = i;
  15. }
  16. if(id == -1) return SCM(playerid,COLOR_WHITE, "{FFFF00}[LZ|SMS] Uneli ste nepostojeci broj.");
  17. GetPlayerName(playerid,sendername,sizeof(sendername));
  18. GetPlayerName(id,guza,sizeof(guza));
  19. format(string,sizeof(string),"{FFFF00}[LZ|SMS]{FFFFFF} Stigao vam je SMS.{F3FF02} Poslao: %s", sendername);
  20. SendClientMessage(id, COLOR_WHITE, string);
  21. format(string1,sizeof(string1),"{FFFF00}[LZ|SMS] {F3FF02}Sms glasi:{FFFFFF} %s", text);
  22. SendClientMessage(id, COLOR_WHITE, string1);
  23. SCM(playerid, COLOR_WHITE, "{FFFF00}[LZ|SMS]{AFAFAF} Poruka uspesno dostavljena!");
  24. GivePlayerMoney(playerid, -1);
  25. GameTextForPlayer(playerid, "~r~-1$", 2500, 1);
  26. }
  27. else SCM(playerid, COLOR_WHITE, "{FFFF00}[LZ]{AFAFAF} Nemate telefon.");
  28. return 1;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment