11.03.2010, 17:45
Now i have the command:
But nothing happens it says unknown command did i do wrong?
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
//LEADING TEAM COMMAND//////////////
if (strcmp("/lolled", cmdtext, true, 10) == 0)
{
new team1cash;
new team2cash;
for(new i = 1; i < MAX_PLAYERS; i++)
{
if( GetPlayerTeam( i ) == 1 ) // or other team checking
{
team1cash = team1cash+GetPlayerMoney(i);
}
if( GetPlayerTeam( i ) == 2 ) // or other team checking
{
team2cash = team2cash+GetPlayerMoney(i);
}
}
if( team1cash > team2cash )
{
new string[128];
format(string,sizeof(string),"The Grove team is leading with %s Money",team1cash);
SendClientMessageToAll(GetPlayerColor(playerid),string);
}
if( team2cash > team1cash )
{
new string[128];
format(string,sizeof(string),"The Balla team is leading with %s Money",team2cash);
SendClientMessageToAll(GetPlayerColor(playerid),string);
}
}
return 0;
}

