Advertisement
RiccB

Kauliukai

Oct 31st, 2017
99
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. new kauliukas[MAX_PLAYERS];
  2.  
  3. CMD:kauliukai(playerid)
  4. {
  5. if(kauliukas[playerid] > gettime()) return SendClientMessage(playerid,0xff0000ff,"KLAIDA.{ffffff} Kauliukus mesti galite, tik kas 10 sekundžių");
  6. new Float:x,Float:y,Float:z;
  7. new rand = random(12);
  8. rand++;
  9.  
  10. new txt[51];
  11. new vardas[21];
  12. GetPlayerName(playerid, vardas, 21);
  13. format(txt,65,"%s išmetė kauliukus, iškrito %d",vardas, rand);
  14. GetPlayerPos(playerid,x,y,z);
  15. kauliukas[playerid] = gettime()+10;
  16.  
  17. for(new p; p<MAX_PLAYERS; p++)
  18. {
  19. if(IsPlayerInRangeOfPoint(p,15,x,y,z))
  20. {
  21. SendClientMessage(p,0xffff00ff,txt);
  22. }
  23. }
  24. return 1;
  25. }
Advertisement
RAW Paste Data Copied
Advertisement