Posts: 240
Threads: 79
Joined: Sep 2016
Reputation:
0
So I recently ask help so much for my event system and I still have 1 more problem to solve so what I need is when player join and event it save his skin color money and weapons and when he leave event with the cmd it load them back for him so he don't lose or any thing get changed can you tell me how to do this like lets say there is cmd:
CMD:event(playerid, params[])
{
here the code to save them
}
CMD:leaveevent(playerid, params[])
{
here the code to load them back fro hom
}
Ik I am asking a lot today but this the last problem I have in the event system so please help me.
Posts: 1,219
Threads: 51
Joined: Jul 2012
This section is for help on problems, not for giving you code, also what you are trying to achieve is not that hard and possible by using variables, getter methods and setter methods.
here is an example:
PHP код:
new skin[MAX_PLAYERS];
CMD:event(playerid, params[])
{
skin[playerid] = GetPlayerSkin(playerid);
}
CMD:leaveevent(playerid, params[])
{
SetPlayerSkin(playerid, skin[playerid]);
}
If you need information on how to do that with weapons (little harder), ****** it / search the forum
Posts: 1,147
Threads: 109
Joined: Jul 2013
Reputation:
0
Oh my God, I typed everything on my phone but per accidentally deleted it, Ill help you later, be patient.
Posts: 240
Threads: 79
Joined: Sep 2016
Reputation:
0
ok I plz help as fast as you can
Posts: 1,219
Threads: 51
Joined: Jul 2012
Quote:
Originally Posted by silverms
ok I plz help as fast as you can
|
the information i gave u is enough
Posts: 109
Threads: 19
Joined: Jun 2015
Reputation:
0
if u are using Dini Data base u can just write a new line and store the player skin id in it (Example: "pskin=0") and when he left the event just get it back, set the skin and remove the line.
Posts: 1,219
Threads: 51
Joined: Jul 2012
Quote:
Originally Posted by silverms
thanks for the idea ur brilliant ![Smiley](images/smilies/smile.png) !
|
Terrible idea, but ok ...