30.05.2012, 08:44
Quote:
hello,
I Have Created a Server in which there are two Teams, Red and another Yellow so can someone tell me How can i add That if Red team Member Kills Yellow Team member it gives $50 and 1 Score to Red Tea Player !! And same with Yellow Team !! 2. If someone Shoot his own Teammate, it should say : "Dont Kill Team Mates !" and the Team members health should be remain full !! Hope anyone help me Thanks Avi. |
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new pSore;
pScore = GetPlayerScore(killerid);
SetPlayerScore(killerid,pScore + 1 ); //1 is the amount of score you want to give it to the killer
GivePlayerMoney(killerid,50);//50 is the amount of money you want to give it to the killer
GameTextForPlayer(killerid,"Keep Killing !",2000,4);
}
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(gTeam[issuerid] == gTeam[playerid])
{
GameTextForPlayer(issuerid,"Dont Kill Team Mates !",2000,4);
}
}
return 1;
}