04.10.2010, 10:15
I'm not sure what you really want, this MAY work:
it will give the player 1 score, the team will get 1 score too..
You should edit that code btw..
pawn Код:
#include <a_samp>
#include "../include/gl_common.inc"
new Team1Score;
new Team2Score;
new gTeam[MAX_PLAYERS];
public OnPlayerDeath(playerid,killerid,reason)
{
SetPlayerScore(killerid,(GetPlayerScore(playerid)) +1); // Gives the player 1 point
if(gTeam[killerid] == 1)
{
Team1Score ++; // Gives the team 1 score
}
else
{
Team2Score ++; // Gives the team 1 score
}
return 1;
}
public OnPlayerCommandText(playerid,cmdtext[])
{
new Text[256];
new Text2[256];
new cmd[256];
new idx;
cmd = strtok(cmdtext,idx);
if(strcmp(cmd,"/Score",true)==0)
{
format(Text,sizeof(Text),"Team one's score: %d",Team1Score);
format(Text2,sizeof(Text2),"Team two's Score: %d",Team2Score);
SendClientMessage(playerid,0xAFAFAFF,Text);
SendClientMessage(playerid,0xAFAFAFF,Text2);
return 1;
}
return 1;
}
You should edit that code btw..