10.08.2014, 14:16
Hi
i want make this cmd , if is admin is can't find admin , is can find just players [ because when u spec player , he know u[ spec him ]
[Detective]
i want make this cmd , if is admin is can't find admin , is can find just players [ because when u spec player , he know u[ spec him ]
[Detective]
pawn Код:
CMD:find(playerid, params[])
{
new targetID;
if(sscanf(params, "u", targetID)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/find [playerid]");
{
if(groupVariables[playerVariables[playerid][pGroup]][gGroup] == 1 || jobVariables[playerVariables[playerid][pJob]][jJob] == 2 || groupVariables[playerVariables[playerid][pGroup]][gGroup] == 12 )
{
new name[MAX_PLAYER_NAME];
GetPlayerName(targetID, name, MAX_PLAYER_NAME);
FindTime[playerid] = 1;
PlayerFind[playerid] = targetID;
new Float: x, Float: y, Float: z;
GetPlayerPos(targetID,x,y,z);
new Float: fDistance = GetPlayerDistanceFromPoint(playerid, x,y,z);
format(szMessage, 256, "Server has set you a checkpoint to %s (%d). Distance: %0.2f meters.",name, targetID, fDistance);
SCM(playerid,COLOR_COOLBLUE, szMessage);
SetPlayerCheckpoint(playerid,x,y,z,3.0);
}
}
return 1;
}