Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. cmd(pm, playerid, cmdtext[])
  2. {
  3. new Gracz;
  4. if(sscanf(cmdtext, "ds[124]", Gracz, tempo))
  5. {
  6. return SendClientMessage(playerid, 0xEE4000FF, "[PDS]: Użyj: /pm [ID Gracza] [Treść wiadomośći]");
  7. }
  8. if(!IsPlayerConnected(Gracz))
  9. {
  10. return SendClientMessage(playerid, 0xEE4000FF, "[PDS]: Złe ID!");
  11. }
  12. if(Player[Gracz][ZarazWraca] == true)
  13. {
  14. SCM(playerid, COLOR_GRAY, "** Gracz do którego chcesz wysłac wiadomosc jest daleko od komputera. **");
  15. }
  16. //------------------------------------------------------------------------------
  17. if(IsIP(tempo, false))
  18. return 0;
  19. //------------------------------------------------------------------------------
  20. if(GetPVarInt(playerid, "PMOFF") == 1)
  21. {
  22. SCM(playerid, COLOR_RED, "** Prywatne wiadomości wyłączone. Aby je włączyc wpisz /pmon **");
  23. return 1;
  24. }
  25.  
  26. if(GetPVarInt(Gracz, "PMOFF") == 1)
  27. {
  28. SCM(playerid, COLOR_RED, "** Prywatne wiadomosci u tego gracza są wyłączone! **");
  29. return 1;
  30. }
  31.  
  32. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  33. PlayerPlaySound(Gracz, 1057, 0.0, 0.0, 0.0);
  34. GameTextForPlayer(Gracz, "Nowy ~r~PM", 2000, 1);
  35. format(strr,sizeof(strr),"{00FFFF}** Wiadmość od {FFFFFF}%s (%d) {00FFFF}**", PlayerName(playerid), playerid);
  36. SCM(Gracz, 0x0, strr);
  37. format(strr,sizeof(strr),"{00FFFF}Treść:{FFFFFF} %s", tempo);
  38. SCM(Gracz, 0x0, strr);
  39.  
  40. format(strr,sizeof(strr),"** Prywatna wiadomość do %s została wysłana! **", PlayerName(Gracz));
  41. SCM(playerid, 0x87CEFFFF, strr);
  42.  
  43. return 1;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement