Help with Anti-Heli Blading
#3

As above said, you need to define currentveh.
The problem is, he's getting the vehicleid of the player that was killed, not the player that killed him.
So, do this instead.

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	if (reason == 50);
	{
        new currentveh;
        currentveh = GetPlayerVehicleID(killerid);
        DestroyVehicle(currentveh);
	SendDeathMessage(killerid, playerid, reason);
        SendClientMessage(killerid, -1, "Heliblading is not allowed!");
	}
	return 1;
}
This code checks if the player (playerid) was killed by reason 50.
If so, it gets the killer (killerid)'s vehicleid, and destroys it.
It also sends him a client message saying Heliblading isn't allowed.
Reply


Messages In This Thread
Help with Anti-Heli Blading - by Mobeen - 09.02.2014, 13:36
Re: Help with Anti-Heli Blading - by judothijs - 09.02.2014, 14:21
Re: Help with Anti-Heli Blading - by Unfriendly - 09.02.2014, 14:57
Re: Help with Anti-Heli Blading - by judothijs - 09.02.2014, 15:15
Re: Help with Anti-Heli Blading - by Mobeen - 09.02.2014, 17:36
Re: Help with Anti-Heli Blading - by judothijs - 09.02.2014, 19:23
Re: Help with Anti-Heli Blading - by Mobeen - 11.02.2014, 22:53
Re: Help with Anti-Heli Blading - by Unfriendly - 20.02.2014, 19:35

Forum Jump:


Users browsing this thread: 3 Guest(s)