05.06.2011, 13:26
i created this command and i go to server and said Unknown Commands he dont work
what i wrong
what i wrong
pawn Код:
dcmd_teamstats(playerid, cmdtext[])
{
#pragma unused cmdtext
new giveteamid, idx, tmp[256];
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
{
for (new i = 0; i < MAX_TURFS; i++) {
new msg[ 256 ];
format(msg, sizeof(msg), "~w~%s stats:~n~~g~Turfwars Won: %d~n~~r~Turfwars Lost: %d~n~~w~Rivals killed: %d~n~Homies lost: %d~n~~y~Turfs: %d~n~~w~Teamscore: %d",
TeamInfo[ gTeam[playerid] ][ TeamName ], TeamInfo[ gTeam[playerid] ][ TurfWarsWon ],
TeamInfo[ gTeam[playerid] ][ TurfWarsLost ], TeamInfo[ gTeam[playerid] ][ RivalsKilled ],
TeamInfo[ gTeam[playerid] ][ HomiesDied ], OwnedTurfs(), TeamInfo[ gTeam[playerid] ][ TeamScore ]);
new Text:txt = TextDrawCreate( 33.0, 261.0, msg);
TextDrawUseBox( txt, 1 );
TextDrawBoxColor( txt, 0x00000066 );
TextDrawTextSize( txt, 141.0, 0.0 );
TextDrawAlignment( txt, 0 );
TextDrawBackgroundColor( txt, 0x000000ff );
TextDrawFont( txt, 1 );
TextDrawLetterSize( txt, 0.29, 1.0 );
TextDrawColor( txt, 0xffffffff );
TextDrawSetOutline( txt, 1 );
TextDrawSetProportional( txt, 1 );
TextDrawSetShadow( txt, 1 );
TimeTextForPlayer( playerid, txt, 6000 );
return 1;
}
}
giveteamid = strval(tmp);
if ((giveteamid < 0 || giveteamid > 14)) {
SendClientMessage(playerid, COLOR_RED, "No such teamid! Look at the teamid's.");
SendClientMessage(playerid, COLOR_WHITE, "Grove: 1 l Ballas : 2 l Vagos: 3 l Aztegas: 4'");
SendClientMessage(playerid, COLOR_WHITE, "Cop: 5 | Biker: 6 | Rapper: 7 ");
return 1;
}
for (new i = 0; i < MAX_TURFS; i++) {
new msg[ 256 ];
format(msg, sizeof(msg), "~w~%s stats:~n~~g~Turfwars Won: %d~n~~r~Turfwars Lost: %d~n~~w~Rivals killed: %d~n~Homies lost: %d~n~~y~Turfs: %d~n~~w~Teamscore: %d",
TeamInfo[ giveteamid ][ TeamName ], TeamInfo[ giveteamid ][ TurfWarsWon ],
TeamInfo[ giveteamid ][ TurfWarsLost ], TeamInfo[ giveteamid ][ RivalsKilled ],
TeamInfo[ giveteamid ][ HomiesDied ], OwnedTurfs2(giveteamid), TeamInfo[ giveteamid ][ TeamScore ]);
new Text:txt = TextDrawCreate( 33.0, 261.0, msg);
TextDrawUseBox( txt, 1 );
TextDrawBoxColor( txt, 0x00000066 );
TextDrawTextSize( txt, 141.0, 0.0 );
TextDrawAlignment( txt, 0 );
TextDrawBackgroundColor( txt, 0x000000ff );
TextDrawFont( txt, 1 );
TextDrawLetterSize( txt, 0.29, 1.0 );
TextDrawColor( txt, 0xffffffff );
TextDrawSetOutline( txt, 1 );
TextDrawSetProportional( txt, 1 );
TextDrawSetShadow( txt, 1 );
TimeTextForPlayer( playerid, txt, 6000 );
return 1;
}
return 1;
}