SA-MP Forums Archive
Help +rep - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help +rep (/showthread.php?tid=531030)



Help +rep - SHFaCeBook - 10.08.2014

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]

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;
}



Re: Help +rep - Stanford - 10.08.2014

pawn Код:
if(playerVariables[targetID][pAdmin]) return SendClientMessage(playerid, -1, "");