Script doesn't save last pos and skin
#4

Create a pModel / pSkin / pChar
Every time that you change a player's skin use like
pawn Код:
CMD:setskin(playerid, params[])
{
      new amount;
      if(sscanf(params, "ui", giveplayerid, amount)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setskin [playerid] [skinid]");
      PlayerInfo[giveplayerid][pModel] = amount; // amount is the skin id, look above at the if(sscanf
      SetPlayerSkin(giveplayerid, amount); // the original SetPlayerSkin just with pModel above it so it will have the same value and will save.
      return 1;
}
Then go under OnPlayerSpawn
pawn Код:
SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
      SendClientMessage(playerid, COLOR_WHITE, "Your skin was changed to the saved skin!");
NOTE: You'll need a saving system like dini so the pModel will save.
Good luck!
Reply


Messages In This Thread
Script doesn't save last pos and skin - by Sellize - 31.07.2013, 11:47
Re: Script doesn't save last pos and skin - by Sellize - 31.07.2013, 12:43
Re: Script doesn't save last pos and skin - by dEcooR - 31.07.2013, 13:02
Re: Script doesn't save last pos and skin - by Ceez - 31.07.2013, 14:17
Re: Script doesn't save last pos and skin - by Calabresi - 31.07.2013, 14:22

Forum Jump:


Users browsing this thread: 1 Guest(s)