How to? skin command save on next spawn. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to? skin command save on next spawn. (
/showthread.php?tid=456800)
How to? skin command save on next spawn. -
Champ - 07.08.2013
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.
Re: How to? skin command save on next spawn. -
ThePhenix - 07.08.2013
Here's an example:
PHP код:
new Skin[MAX_PLAYERS];
CMD:skin(playerid, params[])
{
new skin, string[150];
if(sscanf(params, "d", skin)) return SendClientMessage(playerid, -1, "USAGE: /skin [skinid]");
Skin[playerid] = skin;
format(string, sizeof(string), "You are going to spawn with the following skin: %d", skin);
SendClientMessage(playerid, -1, string);
SetPVarInt(playerid, "ChangedSkin", 1);
return 1;
}
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid, "ChangedSkin") == 1)
{
SetPlayerSkin(playerid, Skin[playerid]);
}
return 1;
}
Re: How to? skin command save on next spawn. -
Champ - 07.08.2013
thanks for helping
pawn Код:
new Rep;
public OnPlayerGiveReputation(playerid)
(
Rep++;
)