Scripting a custom class selection
#9

PHP код:
    new what;
    
GetSkinEx(LastSkinZ[playerid], classidwhat);
    
LastSkinZ[playerid] = classid;
    if(
what 0)
    {
        if(!
firstTime[playerid])
        {
            
firstTime[playerid] = 0;
            
SetPlayerSkinEx(playeridcurrSkin[playerid]);
        }
        else
        {
            
currSkin[playerid] ++;
            
SetPlayerSkinEx(playeridcurrSkin[playerid]);
        }
    }
    else
    {
        
currSkin[playerid] --;
        
SetPlayerSkinEx(playeridcurrSkin[playerid]);
    } 
be sure your firsttime being set to 0 on connect then change above code with:
PHP код:
    new what;
    
GetSkinEx(LastSkinZ[playerid], classidwhat);
    
LastSkinZ[playerid] = classid;
    if(
what 0)
    {
        if(!
firstTime[playerid])
        {
            
firstTime[playerid] = 1;
            
SetPlayerSkinEx(playeridcurrSkin[playerid]);
        }
        else
        {
            
currSkin[playerid] ++;
            
SetPlayerSkinEx(playeridcurrSkin[playerid]);
        }
    }
    else
    {
        
currSkin[playerid] --;
        
SetPlayerSkinEx(playeridcurrSkin[playerid]);
    } 
~shit double post thought am editing above reply ._.
Reply


Messages In This Thread
Scripting a custom class selection - by JaKe Elite - 20.12.2016, 12:37
Re: Scripting a custom class selection - by jlalt - 20.12.2016, 14:03
Re: Scripting a custom class selection - by JaKe Elite - 20.12.2016, 20:37
Re: Scripting a custom class selection - by jlalt - 21.12.2016, 04:03
Re: Scripting a custom class selection - by JaKe Elite - 24.12.2016, 00:03
Re: Scripting a custom class selection - by jlalt - 24.12.2016, 05:19
Re: Scripting a custom class selection - by Sew_Sumi - 24.12.2016, 07:51
Re: Scripting a custom class selection - by JaKe Elite - 24.12.2016, 07:56
Re: Scripting a custom class selection - by jlalt - 24.12.2016, 12:08
Re: Scripting a custom class selection - by Sew_Sumi - 24.12.2016, 13:04

Forum Jump:


Users browsing this thread: 2 Guest(s)