[HELP]/dm1 and /leavedm
#1

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
Reply
#2

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

Can you give me example?
Reply
#4

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.
Reply
#5

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

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)