Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:find(playerid, params[])
- {
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi mai intai.");
- if(IsPlayerConnected(playerid))
- {
- if(CP[playerid] < 1 && IsCollectingRubbish[playerid] < 1 && !IsATruck(GetPlayerVehicleID(playerid)) && MechanicCallTime[playerid] < 1 && CheckBus[playerid] < 1 && GotoMats[playerid] < 1 && CarJacker[playerid] < 1)
- {
- new id,giveplayer[30],string[100];
- if(BusinessRob[playerid] > 0) return SendClientMessage(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda in timp ce jefuiesti o afacere.");
- if(PlayerInfo[playerid][pJob] != 1 && !IsACop(playerid) && PlayerInfo[playerid][pMember] != 11) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You are not a Detective/Cop/Hitman.");
- if(sscanf(params, "u",id)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF9900}Scrie: {33CCFF}/find <Name/Playerid>");
- if(IsPlayerConnected(id))
- {
- if(id != INVALID_PLAYER_ID)
- {
- if(id == playerid) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}Nu te poti gasi singur.");
- if(togfind[id] == 1) return SCM(playerid,COLOR_WHITE,"{FFFFCC}Nu poti folosi comanda /find pe acest player.");
- UsedFind[playerid] = 1;
- GetPlayerName(id, giveplayer, sizeof(giveplayer));
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(id, X,Y,Z);
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid, X,Y,Z, 3.5);
- CP[playerid] = 43;
- targetfind[playerid] = id;
- new str2[128],str[128];
- format(str2,sizeof(str2),"Target: ~r~%s~w~(%d)",giveplayer,id);
- PlayerTextDrawSetString(playerid, findtext[playerid], str2);
- PlayerTextDrawShow(playerid, findtext[playerid]);
- format(str,sizeof(str),"Distance: ~r~%.0f~w~m",GetDistanceBetweenPlayers(playerid, id));
- PlayerTextDrawSetString(playerid, findtext2[playerid], str);
- PlayerTextDrawShow(playerid, findtext2[playerid]);
- format(string,sizeof(string),"{FFFF00}Checkpoint-ul va afisa locatia playerului %s. Distanta pana la player: %.0f.",giveplayer,GetDistanceBetweenPlayers(playerid, id));
- SCM(playerid,COLOR_WHITE,string);
- }
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_JOBULETES, DIALOG_STYLE_MSGBOX, "Anulare Checkpoint", "Esti sigur ca vrei sa anulezi checkpoint-ul curent?", "Da", "Nu");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement