/saveskin
#1

How can i script a /saveskin Command, that the Skin got automatic saved, when he use /saveskin and when the Player spawn?
Reply
#2

use this:

frist, make a symbol on top
pawn Код:
new PlayerSkin[MAX_PLAYERS];
now put this code in OnPlayerConnect and OnPlayerDisconnect:
pawn Код:
PlayerSkin[playerid] = -1;
then make a cmd:
if you use zcmd so try this:
pawn Код:
CMD:saveskin(playerid)
{
   PlayerSkin[playerid] = GetPlayerSkin(playerid);
   SendClientMessage(playerid,-1,"Skin Saved");
   return 1;
}
if not then put this in your OnPlayerCommand:
pawn Код:
if(!strcmp("/saveskin",cmdtext,true))
{
   PlayerSkin[playerid] = GetPlayerSkin(playerid);
   SendClientMessage(playerid,-1,"Skin Saved");
   return 1;
}
now goto your OnPlayerSpawn then put this
pawn Код:
if(PlayerSkin[playerid] != -1)
{
   SetPlayerSkin(playerid, PlayerSkin[playerid]);
}
Rep if i Helped You
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)