SA-MP Forums Archive
Help please. - 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 please. (/showthread.php?tid=394458)



Help please. - Goldino - 22.11.2012

Hey guys, I'm looking for a code that when a player tries to spawn with a specific skin, it will say Error: This skin is for admins only...

For example...


-Player logs on to server
-Chooses an admin skin
-When they click Spawn, it will say ''Error: This skin is for admins only''



And when a admins logs on...


-Admin logs on to server
-Chooses an admin skin
-Server sends a message to them saying ''You have spawned with an admin skin!''


Please help me


Re: Error in Compiler - -=Dar[K]Lord=- - 22.11.2012

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    if(classid == 3 && !IsPlayerAdmin(playerid))
    {
             SendClientMessage(playerid,COLOR_GREEN,"This skin is only for admins!");
             return 0;
        }
        return 1;
}