Save Weapons when /q +REP -
TheMightyEddy - 06.04.2012
Does anyone know how to make it so that it saves a players weapons and ammo when they exit the server but when they get killed or die, they lose everything? I'm using ZCMD.
Re: Save Weapons when /q +REP -
ReneG - 06.04.2012
What system are you using to save a player's stats?
Re: Save Weapons when /q +REP -
Jack.7331 - 06.04.2012
Under onPlayerDeath()
ResetPlayerWeapons(playerid)
Re: Save Weapons when /q +REP -
itaialroy - 06.04.2012
You should try editing the mod with adding some weapon lines on user.cfg creation.
Re: Save Weapons when /q +REP -
Rob_Maate - 06.04.2012
No comment.
Re: Save Weapons when /q +REP -
TheMightyEddy - 06.04.2012
wait so how do I do it?
Re: Save Weapons when /q +REP -
Jack.7331 - 06.04.2012
Go to public OnPlayerDeath()
and under that, put ResetPlayerWeapons(playerid);
Re: Save Weapons when /q +REP -
ReneG - 06.04.2012
To reset weapons on death you would add this under OnPlayerDeath.
So it would end up looking something like this.
pawn Код:
public OnPlayerDeath(playerid,killerid)
{
ResetPlayerWeapons(playerid);
// rest of your code here
return 1;
}
About saving guns when a player logs off, we need to know what saving system you are using (if you even have one).
Re: Save Weapons when /q +REP -
TheMightyEddy - 06.04.2012
Quote:
Originally Posted by Jack.7331
Go to public OnPlayerDeath()
and under that, put ResetPlayerWeapons(playerid);
|
Okay thanks but that's only on player death. How can I save the weapons when the player disconnects.
Re: Save Weapons when /q +REP -
BetaLaxx - 06.04.2012
Quote:
Originally Posted by TheMightyEddy
Does anyone know how to make it so that it saves a players weapons and ammo when they exit the server but when they get killed or die, they lose everything? I'm using ZCMD.
|
So from your thinking you're gunna make a command "/Quit"\"/Q" And Then when player types that it saves guns for him?
That's weird, Save guns onplayerdisconnect.
We don't know what .ini you are using.
Is it dini, fini, y_ini or something else? (name it)
They lose guns normally on death, Just set the variables of gun and ammo to 0.