SA-MP Forums Archive
Confused again :| - 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: Confused again :| (/showthread.php?tid=147277)



Confused again :| - ViruZZzZ_ChiLLL - 11.05.2010

Okay, so when a player types /dm, how can I
reset all of the players weapon and give him
a new weapon


Re: Confused again :| - Zh3r0 - 11.05.2010

Put
pawn Код:
ResetPlayerWeapons(playerid);
BEFORE:
pawn Код:
GivePlayerWeapon(playerid, weaponid);
Should look like this:
pawn Код:
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, weaponid);
So first it removes player's weapons, then it gives a new one.


Re: Confused again :| - ViruZZzZ_ChiLLL - 11.05.2010

Quote:
Originally Posted by PlayON
Put
pawn Код:
ResetPlayerWeapons(playerid);
BEFORE:
pawn Код:
GivePlayerWeapon(playerid, weaponid);
Should look like this:
pawn Код:
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, weaponid);
So first it removes player's weapons, then it gives a new one.
Thanks I was just thinking about that, but
I thought it wouldn't give the player any gun
because it will just reset the players weapon
when he goes in dm. So, thanks


Re: Confused again :| - iJumbo - 11.05.2010

Код:
	if(!strcmp("/command", cmdtext, true))
	{
	    SetPlayerPos(...);
        ResetPlayerWeapons(playerid);
        GivePlayerWeapon(...);
		return 1;
	}