Help for TDM Server ! ( REP +1 )
#1

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.
Reply
#2

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
Reply
#3

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
Reply
#4

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 !
Reply
#5

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;
}
Reply
#6

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
Reply
#7

Team killing message? why not just use gTeam, to stop team killing all together
Reply
#8

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
Reply
#9

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 !!
Reply
#10

here i fix it and add what you want
http://pastebin.com/KJR0wv2v
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)