03.06.2012, 17:25
tipo eu tava arrumando o /carandiru e /cadeia e deu 3 warnings podem me ajudar ?
Warnings :
Code:
Linhas dos Warnings:
Aй o code do /sethora (apesar que eu nem mexi no sethora mais .. )
Se Poderem me ajudar agradeзo vlw
Warnings :
pawn Код:
C:\Documents and Settings\Rodrigo\Meus documentos\Downloads\BPS2\gamemodes\BPL.pwn(27875) : warning 217: loose indentation
C:\Documents and Settings\Rodrigo\Meus documentos\Downloads\BPS2\gamemodes\BPL.pwn(28038) : warning 217: loose indentation
C:\Documents and Settings\Rodrigo\Meus documentos\Downloads\BPS2\gamemodes\BPL.pwn(28136) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 10976 bytes
Code size: 2143288 bytes
Data size: 2132016 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4608 cells (18432 bytes)
Total requirements: 4302664 bytes
3 Warnings.
pawn Код:
if(strcmp(cmd, "/cadeia", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [tempo] [motivo]");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 2)
{
if(PlayerInfo[playerid][pJailed] != 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode prender quem jб estб Preso!");
return 1;
}
}
new length = strlen(cmdtext);
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [tempo] [motivo]");
return 1;
}
if(PlayerInfo[playerid][pJailed] != 0 && PlayerInfo[playerid][pAdmin] < 1338)
{
SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode tirar da cadeia!");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 2)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1340 && PlayerInfo[playerid][pAdmin] != 1341 && PlayerInfo[playerid][pAdmin] != 1342)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pSex] == 1)
{
SetPlayerSkin(giveplayerid, 268);
}
else
{
SetPlayerSkin(giveplayerid, 69);
}
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Vocк mandou %s para a cela admin.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Voce foi preso pelo Admin %s.", sendername);
SendClientMessage(playa, COLOR_LIGHTRED, string);
ResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 6;
PlayerInfo[playa][pJailTime] = money*60;
SetPlayerInterior(playa, 0);
SetPlayerPos(playa,1174.3188,-1179.1814,87.0183);
format(string, sizeof(string), "Voce foi preso por %d Minutos na Cela Admin.", money);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "ADMCMD: %s Colocou %s Por %d Minutos Na Cadeia. Motivo: %s", PlayerName(playerid), giveplayer,money,(result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nгo esta autorizado a usar este comando!");
}
}
return 1;
}
//carandiru
if(strcmp(cmd, "/carandiru",true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tempo[20];
new tempo2;
if(PlayerInfo[playerid][pAdmin] < 2)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo esta autorizado para usar este comando!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] <= 4)
{
if(PlayerInfo[playerid][pJailed] != 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode prender quem jб estб Preso!");
return 1;
}
}
tmp = strtok(cmdtext, idx);
tempo = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /carandiru [ ID ] [ Tempo ] [ Motivo ]");
return 1;
}
if(!strlen(tempo))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /carandiru [ ID ] [ Tempo ] [ Motivo ]");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /carandiru [ ID ] [ Tempo ] [ Motivo ]");
return 1;
}
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1340 && PlayerInfo[playerid][pAdmin] != 1341 && PlayerInfo[playerid][pAdmin] != 1342)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode dar carandiru para um Admin Dono !");
return 1;
}
if(admtrampando[playerid] < 1 && PlayerInfo[giveplayerid][pAdmin] != 1340 && PlayerInfo[playerid][pAdmin] != 1341 && PlayerInfo[playerid][pAdmin] != 1342)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
giveplayerid = ReturnUser(tmp);
tempo2 = strval(tempo);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pSex] == 1)
{
SetPlayerSkin(giveplayerid, 268);
}
else
{
SetPlayerSkin(giveplayerid, 69);
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "ADMCMD: %s Colocou %s por %d Minutos no Carandiru. Motivo: %s", sendername, giveplayer, tempo2, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Vocк foi colocado no Carandiru Pelo Admin %s.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
GameTextForPlayer(giveplayerid, "~b~Bem Vindo ao ~n~~r~Carandiru", 5000, 3);
ResetPlayerWeaponsEx(giveplayerid);
WantedPoints[giveplayerid] = 0;
SetPlayerWantedLevel(giveplayerid, 0);
PlayerInfo[giveplayerid][pJailed] = 2;
PlayerInfo[giveplayerid][pJailTime] = tempo2 * 60;
SetPlayerPos(giveplayerid, 268.58, 1857.94, 9.81);
SetPlayerWorldBounds(giveplayerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " O jogador estб offline !");
return 1;
}
}
return 1;
}
pawn Код:
[27875] if(strcmp(cmd, "/cadeia", true) == 0)
[28038] if(strcmp(cmd, "/carandiru",true) == 0)
[28136] if(strcmp(cmd, "/sethora", true) == 0)
pawn Код:
if(strcmp(cmd, "/sethora", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /sethora [hora do dia] (0-23)");
return 1;
}
new hour2;
hour2 = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1340 && PlayerInfo[playerid][pAdmin] != 1341 && PlayerInfo[playerid][pAdmin] != 1342)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
SetWorldTime(hour2);
format(string, sizeof(string), " Tempo Definido Para %d Horas.", hour2);
BroadCast(COLOR_GRAD1, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб autorizado a usar o comando!");
}
}
return 1;
}