skin selection
#1

hi. i want to make skin save so when player register they can pick class and when player re-login after he quit, he can go to skin selection screen and the first skin will be the skin he had before/when he register.

i have Onplayerspawn:
pawn Код:
SetPlayerSkin(playerid,dUserINT(PlayerName(playerid)).("Skin"));
i have this on Onplayerdisconnect:
pawn Код:
new skinid = GetPlayerSkin(playerid);
dUserSetINT(PlayerName(playerid)).("Skin",skinid);
am i doing wrong? and now how i am supposed to do?
Reply
#2

Quote:
Originally Posted by n00b_scripter
Посмотреть сообщение
well you just need to add
OnPlayerRequestClass();
or a thing like this in OnPlayerResponce inside the responce of your register command
+
you new thing
add the 1st class in your gamemode this
AddPlayerClass((PlayerInfo[playerid][pskin]),X,Y,Z);
you need to udjest it as you wana do it
wait what you mean?
Reply
#3

Wrong is that playerid will be differnt if another player join
[e.g. if pID = current player he left his id was 1 and beofre he rejoin another player join with id 1 then it will be useless , so this is worn methos of saving temporary informations / data / vars
so u cant use (playerid) in variables of OnPlayerDisconnect
Reply
#4

Quote:
Originally Posted by Niko_boy
Посмотреть сообщение
Wrong is that playerid will be differnt if another player join
[e.g. if pID = current player he left his id was 1 and beofre he rejoin another player join with id 1 then it will be useless , so this is worn methos of saving temporary informations / data / vars
so u cant use (playerid) in variables of OnPlayerDisconnect
okay i see. then i how i would do it?
Reply
#5

actualy i too tried making a system too save temporary variables once but was failed
it was like this -> ( i might be wrong , just see if u get some idea )
1. you should get name of player when he disconnect and store it somewhere and assign a costant ID to it (assigning id part was failing in my script )
2. when reconnects re-compare/ match variables / names and IDs and create some stocks that has a main functioning etc...

as i said i really not sure
Reply
#6

hmm i still dont get

i really need help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)