Need help with OnPlayerRequestClass
#1

Okay so when I put
pawn Код:
SetPlayerSkin(playerid,GetPVarInt(playerid,"Skin"));
in OnPlayerRequestClass it will lock that specific skin and show that specific skin so that players cannot switch to a different one. I want it so I when it's class/skin selection screen, it will start at the last skin they chose and people can choose each time. But the last skin they chose will each time show first. Any help to do this?
Reply
#2

new Skin = GetPVarInt(playerid,"Skin");

Skin++;
if(0 > Skin || Skin >= 300) Skin = 0;

SetPVarInt(playerid, "Skin", Skin);

SetPlayerSkin(playerid, GetPVarInt(playerid,"Skin"));
Reply
#3

Quote:
Originally Posted by TheLazySloth
Посмотреть сообщение
new Skin = GetPVarInt(playerid,"Skin");

Skin++;
if(0 > Skin || Skin >= 300) Skin = 0;

SetPVarInt(playerid, "Skin", Skin);

SetPlayerSkin(playerid, GetPVarInt(playerid,"Skin"));
It crashed my PAWNO. Okay so here is what I have already to SAVE my skins:

pawn Код:
public SaveStats()
{
dUserSetINT(PlayerName(i)).("Skin", GetPVarInt(i, "Skin"));
}

pawn Код:
public OnPlayerDisconnect()
{
dUserSetINT(PlayerName(playerid)).("Skin",GetPlayerSkin(playerid));
}

Here is my code I want to add in now:
pawn Код:
SetPlayerSkin(playerid,GetPVarInt(playerid,"Skin"));
I want it so I when it's class/skin selection screen, it will start at the last skin they chose and people can choose each time. But the last skin they chose will each time show first. Any help to do this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)