SA-MP Forums Archive
deleting weapons when leave area. - 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: deleting weapons when leave area. (/showthread.php?tid=110587)



deleting weapons when leave area. - esttalk - 27.11.2009

Quote:

if(strcmp(cmdtext,"/war",true)==0)
{
if(IsPlayerConnected(playerid))
{
GivePlayerWeapon(playerid, 24, 999);
GivePlayerWeapon(playerid, 34, 999);
GivePlayerWeapon(playerid, 27, 999);
GivePlayerWeapon(playerid, 29, 999);
GivePlayerWeapon(playerid, 16, 99999);
SetPlayerPos(playerid, -975.975708,1060.983032,1345.671875);
SetPlayerInterior(playerid, 10);
SendClientMessage(playerid,GREEN,"");You have teleported to Death Match Area
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), "%s Has gone to Death Match Area(/dm) to join !", name);
SendClientMessageToAll(LIGHTBLUE,string);
GameTextForPlayer(playerid, "~g~Welcome to the war", 3000, 3);
}
return 1;

How can i make like this when you leave this area your weapons will be deleted?


Re: deleting weapons when leave area. - ExoSanty - 27.11.2009

ResetPlayerWeapons:

https://sampwiki.blast.hk/wiki/ResetPlayerWeapons


Re: deleting weapons when leave area. - esttalk - 27.11.2009

Quote:
Originally Posted by ExoSanty
This will remove wepons only when player dies, put when he leaves area? or have i put this end of every command exept /war?


Re: deleting weapons when leave area. - ExoSanty - 27.11.2009

Quote:
Originally Posted by esttalk
Quote:
Originally Posted by ExoSanty
This will remove wepons only when player dies, put when he leaves area? or have i put this end of every command exept /war?
you set it when the player leaves the zone....



Re: deleting weapons when leave area. - Cedimedi - 27.11.2009

or make a timer that checks isplayerinarea.