Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. COMMAND:sekti(playerid, params[])
  2. {
  3. if(playerDB[playerid][specialybe] != 1 && playerDB[playerid][specialybe] != 10) return 0;
  4.  
  5. new giveplayerid, Float: P_Pos[3], String[216];
  6.  
  7. if(!playerDB[playerid][uniformd]) return SendClientMessage(playerid, -1, ""COL_ERROR"[KLAIDA]: {ffffff}Jus esate be darbinių drabužių!");
  8.  
  9. if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, -1, ""COL_USAGE"[NAUDOJIMAS]: "COL_CMD"/sekti <vardas_pavardė/id>");
  10.  
  11. if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, ""COL_ERROR"[KLAIDA]: {ffffff}Tokio žaidėjo nėra!");
  12.  
  13. if(SekamasZaidejas[playerid] != -1)
  14. {
  15. SekamasZaidejas[playerid] = -1;
  16.  
  17. DisablePlayerCheckpointEx(playerid, 21);
  18.  
  19. SendClientMessage(playerid, -1, ""COL_INFO"[DARBAS]: {ffffff}Sekimas atšauktas!");
  20.  
  21. return 1;
  22. }
  23.  
  24. GetPlayerPos(giveplayerid, P_Pos[0], P_Pos[1], P_Pos[2]);
  25.  
  26. SetPlayerCheckpointEx(playerid, 21, P_Pos[0], P_Pos[1], P_Pos[2], 2);
  27.  
  28. SekamasZaidejas[playerid] = giveplayerid;
  29.  
  30. switch(playerDB[playerid][specialybe])
  31. {
  32. case 1:
  33. {
  34. format(String, sizeof(String), ""COL_INFO"[RACIJA] {ff0000}%s: {ffffff}Pradėjau sekti žaidėją {ff0000}%s{ffffff}.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  35. SendMessageToCops(-1, String);
  36. }
  37. case 10:
  38. {
  39. format(String, sizeof(String), ""COL_INFO"[RACIJA] {ff0000}%s: {ffffff}Pradėjau sekti žaidėją {ff0000}%s{ffffff}.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  40. SendMessageToSwatams(-1, String);
  41. }
  42. }
  43.  
  44. return 1;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement