Help for TDM Server ! ( REP +1 ) -
Avi57 - 30.05.2012
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.
Re: Help for TDM Server ! ( REP +1 ) -
pasha97 - 30.05.2012
Quote:
Originally Posted by Avi57
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.
|
cant say without script, send me your gm i will make what you want and send back
Re: Help for TDM Server ! ( REP +1 ) -
Flake. - 30.05.2012
hmm try somthing like this
pawn Код:
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerTeam(i) == teamid)//Notice the (i) instead of [i]
{
GivePlayerMoney(i,amount);//Replace "amount" with the amount of money you want to reward each team member with
}
return 1;
}
}
just edit it for yourself
Re: Help for TDM Server ! ( REP +1 ) -
Avi57 - 30.05.2012
Quote:
Originally Posted by pasha97
cant say without script, send me your gm i will make what you want and send back
|
OK here its :
http://pastebin.com/ecbxeP0P
Please add 1 score,50$ and Teamkill Message
Thanks i will +1 rep you !
Re: Help for TDM Server ! ( REP +1 ) -
[D]ry[D]esert - 30.05.2012
Quote:
Originally Posted by Avi57
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.
|
try this:
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;
}
Re: Help for TDM Server ! ( REP +1 ) -
pasha97 - 30.05.2012
Quote:
Originally Posted by [D]ry[D]esert
try this:
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; }
|
This is right!!!
Avi57, sorry i didnt help you, this guy outshipped me
Re: Help for TDM Server ! ( REP +1 ) -
Flake. - 30.05.2012
Team killing message? why not just use gTeam, to stop team killing all together
Re: Help for TDM Server ! ( REP +1 ) -
Avi57 - 30.05.2012
Quote:
Originally Posted by [D]ry[D]esert
try this:
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; }
|
Got errors :
Код:
C:\Documents and Settings\User\Desktop\New Folder\gamemodes\redyellow.pwn(109) : warning 217: loose indentation
C:\Documents and Settings\User\Desktop\New Folder\gamemodes\redyellow.pwn(114) : warning 217: loose indentation
C:\Documents and Settings\User\Desktop\New Folder\gamemodes\redyellow.pwn(120) : error 017: undefined symbol "pScore"
C:\Documents and Settings\User\Desktop\New Folder\gamemodes\redyellow.pwn(121) : error 017: undefined symbol "pScore"
C:\Documents and Settings\User\Desktop\New Folder\gamemodes\redyellow.pwn(119) : warning 203: symbol is never used: "pSore"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Please i posted pastebin link send me By testinga nd complted Thanks
Re: Help for TDM Server ! ( REP +1 ) -
Avi57 - 30.05.2012
Quote:
Originally Posted by (*|Flake|*)
Team killing message? why not just use gTeam, to stop team killing all together
|
Please do that for me.........
Heres Pastebin :
http://pastebin.com/ecbxeP0P
Please i rep+1 u !!
Re: Help for TDM Server ! ( REP +1 ) -
[D]ry[D]esert - 30.05.2012
here i fix it and add what you want
http://pastebin.com/KJR0wv2v