07.07.2012, 09:10
how to add Pickup when kill other team?
pickup armour or health!
pickup armour or health!
new health;
public OnPlayerDeath(playerid, killerid, reason)
{
if(gTeam[playerid] != gTeam[killerid])
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y,Z);
health = CreatePickup(1240, 2, X,Y,Z, -1);
}
else return SendClientMessage(killerid, COLOR_RED,"You have Killed your Own Team Mate!"); //your wish you want to add this line or not.
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == health)
{
SendClientMessage(playerid, COLOR_GREEN,"Good Job you have killed your enemy and spawned health pickup!");
SetPlayerHealth(playerid, 100.0);
DestroyPickup(health);
}
return 1;
}