21.09.2010, 13:57
pawn Код:
dcmd_giveteamcash(playerid, params[])
{
new giveammount, teamid;
new string[128];
if(IsPlayerLuxAdminLevel(playerid,4))
{
if(sscanf(params, "udi", targetid, teamid, giveammount)) return SendClientMessage(playerid, COLOR_Red, "error: /giveteamcash teamid ammount");
if(teamid == 1)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(gTeam[i] == TEAM_Soldier) return GivePlayerMoney(i, giveammount);
}
}
if(teamid == 2)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(gTeam[i] == TEAM_Sniper) return GivePlayerMoney(i, giveammount);
}
}
if(teamid == 3)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(gTeam[i] == TEAM_Citizen) return GivePlayerMoney(i, giveammount);
}
}
if(teamid == 4)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(gTeam[i] == TEAM_PyroMan) return GivePlayerMoney(i, giveammount);
}
}
if(teamid == 5)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(gTeam[i] == TEAM_Fireman) return GivePlayerMoney(i, giveammount);
}
}
}
return 1;
}
pawn Код:
D:\cca\gamemodes\cca.pwn(415) : warning 217: loose indentation
D:\cca\gamemodes\cca.pwn(415) : error 017: undefined symbol "dcmd_giveteamcash"
D:\cca\gamemodes\cca.pwn(421) : error 017: undefined symbol "sscanf"
D:\cca\gamemodes\cca.pwn(418) : warning 204: symbol is assigned a value that is never used: "string"
D:\cca\gamemodes\cca.pwn(418 -- 461) : warning 225: unreachable code
D:\cca\gamemodes\cca.pwn(418 -- 461) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.