SA-MP Forums Archive
OnPlayerConnect help - 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: OnPlayerConnect help (/showthread.php?tid=364120)



OnPlayerConnect help - Private200 - 29.07.2012

Found how to put skins on playerconnect , but i got some errors on compiling . Here they are

pawn Код:
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(909) : error 001: expected token: ";", but found ")"
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(909) : error 029: invalid expression, assumed zero
Lines :

pawn Код:
public OnPlayerConnect(playerid)
{
    SetPlayerSkin(playerid, 217) >= 1);
    return 1;



Re: OnPlayerConnect help - Kiets - 29.07.2012

Replace it with SetPlayerSkin(playerid, 217);


Re: OnPlayerConnect help - Private200 - 29.07.2012

I need it for level on admin


Re: OnPlayerConnect help - Kiets - 29.07.2012

I don't know your admin level variable, basically it would be like
if(playeradminlevel >= 1) SetPlayerSkin(playerid, 217);
You should replace "playeradminlevel" with admin level variable.


Re: OnPlayerConnect help - Private200 - 29.07.2012

what is
admin level variable ?


Re: OnPlayerConnect help - Private200 - 30.07.2012

help me please , what is admin level variable ?


Re: OnPlayerConnect help - Captain_Mani - 30.07.2012

Try this:

Код:
public OnPlayerConnect(playerid)
{
    SetPlayerSkin(playerid, 217) >= LEVEL 1);
    return 1;



Re: OnPlayerConnect help - Devilxz97 - 30.07.2012

pawn Код:
#include a_samp

enum pInfo
{
    pAdmin
}
new PlayerInfo[MAX_PLAYERS][pInfo];

public OnPlayerConnect(playerid)
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        SetPlayerSkin(playerid, 217);
    }
    return 1;
}