Clear weapons when exiting deathmatch, and deleting vehicle when not used
#1

I have a vehicle spawn script on my server, and the vehicles that are spawned could cause a crash if spawned too much *we could have like 50 vehicles that aren\'t being used*, so I want to know how to make a vehicle delete itself when not being driven. I also want to know how to take away weapons when exiting a deathmatch area.
Reply
#2

Quote:
Originally Posted by craponnaruto
I also want to know how to take away weapons when exiting a deathmatch area.
I can answer only this question for the moment...
So all what you need is when someone exit DM e.g. /exitdm he will be teleported to a place with 100% health and armour or however you like so you need to GetPlayerWeapon from Player and this is easy.. Take a look at this basic code
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/exitdm", cmdtext, true, 10) == 0)
	{
		SetPlayerPos(playerid,1415.11,1247.74,15.0);
		ResetPlayerWeapons(playerid);
		return 1;
	}
	return 0;
}
When player wish exit DM he types e.g. /exitdm and then he willl be SetPlayerPos(teleported) to the given coordinates(place) with all ResetPlayerWeapons(all weapons removed) and note it must be (playerid); if you want only if player exits the DM.

Hope helped you
Reply
#3

Thanks, I decided to make the vehicle spawn an admin only thing
Reply
#4

i guess what ur looking for is like a vehicle streamer.. when in range it creates the vehicle and while out of range it removes it
Reply
#5

Quote:
Originally Posted by craponnaruto
Thanks, I decided to make the vehicle spawn an admin only thing
No problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)