can only choose your saved skin
#1

Hey ,
i want when someone request class he can't (show him only his saved skin) and he can spawn only with his saved skin
i have this:
Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(PlayerInfo[playerid][Skin] == 1) // If the player has previously saved their skin...
    {
        SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
    }
please can some on do it to me
Reply
#2

try this
PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    if(
PlayerInfo[playerid][Skin] > -1// If the player has previously saved their skin...
    
{
        
SetPlayerSkin(playeridPlayerInfo[playerid][Skin]);
    } 
in OnPlayerConnect use PlayerInfo[playerid][Skin] = -1;

to set it as unknown skin
Reply
#3

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    if(
PlayerInfo[playerid][Skin] == classid// If the player has previously saved their skin...
    
{
        
SetPlayerSkin(playeridPlayerInfo[playerid][Skin]);
        return 
1;
    }
    return 
0;

Reply
#4

SOLVED.
Reply
#5

SOLVED.
Reply
#6

SOLVED.
Reply
#7

SOLVED.
Reply
#8

PHP код:
new PlayerInfo[playerid][pSkin]; //make new global var to store player skin
public OnPlayerRequestClass(playeridclassid)
{
    if(
IsLogged[playerid] == 1)
    {
      
SetPlayerSkin(playeridPlayerInfo[playerid][pSkin]);
    }
    return 
1;
}
//make a command to save a skin to account
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/saveskin"cmdtexttrue10) == 0)
    {
                if(
IsLogged[playerid]==1)
                {
             
PlayerInfo[playerid][pSkin]=GetPlayerSkin(playerid);
                     
SendClientMessage(playerid,-1,"Skin Saved");
                }
                else
                {
                      
SendClientMessage(playerid,-1,"You must be logged to save a skin");//print if the player isnt logged
                
}
        return 
1;
    }
    return 
0;

Reply
#9

PHP код:
PlayerInfo[playerid][pModel] = GetPlayerSkin(playerid); 
Add this in save char section.
Reply
#10

SOLVED.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)