How to? skin command save on next spawn.
#1

i want to skin command in which when player use /skin id. Its skin saves when ever he dies. I don't want a file system in which skin should be saved. I don't want to save skin when player disconnects. I just want to save on next player spawn. Any One Help Please....
Thank You.
Reply
#2

Here's an example:


PHP код:
new Skin[MAX_PLAYERS];
CMD:skin(playeridparams[])
{
    new 
skinstring[150];
    if(
sscanf(params"d"skin)) return SendClientMessage(playerid, -1"USAGE: /skin [skinid]");
    
Skin[playerid] = skin;
    
format(stringsizeof(string), "You are going to spawn with the following skin: %d"skin);
    
SendClientMessage(playerid, -1string);
    
SetPVarInt(playerid"ChangedSkin"1);
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    if(
GetPVarInt(playerid"ChangedSkin") == 1)
    {
        
SetPlayerSkin(playeridSkin[playerid]);
    }
    return 
1;

Reply
#3

thanks for helping
pawn Код:
new Rep;
public OnPlayerGiveReputation(playerid)
(
    Rep++;
)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)