SA-MP Forums Archive
IS this possible?? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: IS this possible?? (/showthread.php?tid=240498)



IS this possible?? - Amel_PAtomAXx - 15.03.2011

Is it possible to make a command that only the nickname or the name can use it

somethink like:
if(IsPlayerAdmin(playerid))

but this is for admins , i want only for name something like :

if(PlayerName(Amel_Patomaxx)) // this is not true ofcourse

I do not know how better to explain..


Re: IS this possible?? - iggy1 - 16.03.2011

Ofc Example,
pawn Код:
public OnPlayerConnect(playerid)
{
    new
        pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
   
    if(!strcmp(pName, "iggy"))//if players name is iggy
    {
        //players name is iggy
        SetPlayerHealth(playerid, 999999);
    }
    else//playersname isn't iggy
    {
    }
    return 1;
}



Re: IS this possible?? - Amel_PAtomAXx - 16.03.2011

OU its working thanks man...