SA-MP Forums Archive
[HELP]/dm1 and /leavedm - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]/dm1 and /leavedm (/showthread.php?tid=276519)



[HELP]/dm1 and /leavedm - lyrics - 14.08.2011

Hey yeah i make /dm1 and /leavedm
Yeah i setplayerskin on /dm1
I want when i /leavedm the skin of /dm1 must be reset to the player use skin
i try the code

Код:
GetPlayerSkin(playerid);
But didnt work

Please Help Guys


Re: [HELP]/dm1 and /leavedm - PrawkC - 14.08.2011

Store the players skinid prior to changing it, then when they do /leavedm change it to the skinid you stored.


Re: [HELP]/dm1 and /leavedm - lyrics - 14.08.2011

Can you give me example?


Re: [HELP]/dm1 and /leavedm - grand.Theft.Otto - 14.08.2011

Try this:

pawn Код:
// global variable - top of script

new LastSkin[MAX_PLAYERS];

// in your /dm1 command

LastSkin[playerid] = GetPlayerSkin(playerid);

// in /leavedm

SetPlayerSkin(playerid, LastSkin[playerid]);
Should work.


Re: [HELP]/dm1 and /leavedm - Grim_ - 14.08.2011

pawn Код:
// inside dm1/dm2
SetPVarInt( playerid, "skin", GetPlayerSkin( playerid ) );

// inside /leavedm
SetPlayerSkin( playerid, GetPVarInt( playerid, "skin" ) );
My signature in this case is so right.


Re: [HELP]/dm1 and /leavedm - lyrics - 14.08.2011

Quote:
Originally Posted by Grim_
Посмотреть сообщение
pawn Код:
// inside dm1/dm2
SetPVarInt( playerid, "skin", GetPlayerSkin( playerid ) );

// inside /leavedm
SetPlayerSkin( playerid, GetPVarInt( playerid, "skin" ) );
My signature in this case is so right.
Thanks dude it work