02.09.2012, 14:14
hey guys,
im back xD and im working on a new GM but now my question:
how to make it that when someone shoots at another player from the same team that the player wont loose health? so when for example i shoot my teammate my teammate wont loose ANY health..
also another question:
if i kill someone from the other team i get money and score, i already made that, but now how to fix it that when i use /kill or i just die cuz i crash with plane or etc that i WONT get money and score? i tried alot things but didnt worked yet... anyways this is the code:
Greets Niels
im back xD and im working on a new GM but now my question:
how to make it that when someone shoots at another player from the same team that the player wont loose health? so when for example i shoot my teammate my teammate wont loose ANY health..
also another question:
if i kill someone from the other team i get money and score, i already made that, but now how to fix it that when i use /kill or i just die cuz i crash with plane or etc that i WONT get money and score? i tried alot things but didnt worked yet... anyways this is the code:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
// zorgt ervoor dat als je iemand doodschiet dan krijgt diegene $5000 en 1 score erbij
if(playerid == killerid) return 0;
if(killerid == playerid) return 0;
GivePlayerMoney(killerid, 5000);
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
GameTextForPlayer(playerid, "~g~+ $5000 money~n~~r~+ 1 score", 2000, 3);
return 1;
}