Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2020
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. CMD:find(playerid, params[])
  2. {
  3. if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi mai intai.");
  4. if(IsPlayerConnected(playerid))
  5. {
  6. if(CP[playerid] < 1 && IsCollectingRubbish[playerid] < 1 && !IsATruck(GetPlayerVehicleID(playerid)) && MechanicCallTime[playerid] < 1 && CheckBus[playerid] < 1 && GotoMats[playerid] < 1 && CarJacker[playerid] < 1)
  7. {
  8. new id,giveplayer[30],string[100];
  9. if(BusinessRob[playerid] > 0) return SendClientMessage(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda in timp ce jefuiesti o afacere.");
  10. if(PlayerInfo[playerid][pJob] != 1 && !IsACop(playerid) && PlayerInfo[playerid][pMember] != 11) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You are not a Detective/Cop/Hitman.");
  11. if(sscanf(params, "u",id)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF9900}Scrie: {33CCFF}/find <Name/Playerid>");
  12. if(IsPlayerConnected(id))
  13. {
  14. if(id != INVALID_PLAYER_ID)
  15. {
  16. if(id == playerid) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}Nu te poti gasi singur.");
  17. if(togfind[id] == 1) return SCM(playerid,COLOR_WHITE,"{FFFFCC}Nu poti folosi comanda /find pe acest player.");
  18. UsedFind[playerid] = 1;
  19. GetPlayerName(id, giveplayer, sizeof(giveplayer));
  20. new Float:X,Float:Y,Float:Z;
  21. GetPlayerPos(id, X,Y,Z);
  22. DisablePlayerCheckpoint(playerid);
  23.  
  24. SetPlayerCheckpoint(playerid, X,Y,Z, 3.5);
  25. CP[playerid] = 43;
  26. targetfind[playerid] = id;
  27. new str2[128],str[128];
  28. format(str2,sizeof(str2),"Target: ~r~%s~w~(%d)",giveplayer,id);
  29. PlayerTextDrawSetString(playerid, findtext[playerid], str2);
  30. PlayerTextDrawShow(playerid, findtext[playerid]);
  31. format(str,sizeof(str),"Distance: ~r~%.0f~w~m",GetDistanceBetweenPlayers(playerid, id));
  32. PlayerTextDrawSetString(playerid, findtext2[playerid], str);
  33. PlayerTextDrawShow(playerid, findtext2[playerid]);
  34. format(string,sizeof(string),"{FFFF00}Checkpoint-ul va afisa locatia playerului %s. Distanta pana la player: %.0f.",giveplayer,GetDistanceBetweenPlayers(playerid, id));
  35. SCM(playerid,COLOR_WHITE,string);
  36. }
  37. }
  38. else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
  39. }
  40. else
  41. {
  42. ShowPlayerDialog(playerid, DIALOG_JOBULETES, DIALOG_STYLE_MSGBOX, "Anulare Checkpoint", "Esti sigur ca vrei sa anulezi checkpoint-ul curent?", "Da", "Nu");
  43. }
  44. }
  45. return 1;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement