[AJUDA]BUG /su -
lucasoliveira2009 - 11.11.2011
pawn Код:
if(strcmp(cmd, "/su", true) == 0)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
if(PlayerInfo[playerid][BOPE] >= 1 || PlayerInfo[playerid][EX] >= 1 || PlayerInfo[playerid][PMERJ] >= 1) {
if(IsPlayerConnected(giveplayerid)) {
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
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_GREEN,"Uso correto: /su [id] [motivo]");
return 1;
}
if(strcmp(result,"DOP",true) == 0)
{
result = "Desobediкncia a ordem policial";
PlayerInfo[giveplayerid][Preso] = 120;
}
if(strcmp(result,"TH",true) == 0)
{
result = "Tentativa de Homicidio";
PlayerInfo[giveplayerid][Preso] = 180;
}
if(strcmp(result,"AP",true) == 0)
{
result = "Ajuste de pena";
PlayerInfo[giveplayerid][Preso] = 60;
}
if(strcmp(result,"RV",true) == 0)
{
result = "Roubo de veнculos";
PlayerInfo[giveplayerid][Preso] = 120;
}
if(strcmp(result,"RP",true) == 0)
{
result = "Resistкncia a prisao";
PlayerInfo[giveplayerid][Preso] = 120;
}
if(strcmp(result,"DOP",true) == 0)
{
result = "Desobediкncia a ordem policial";
PlayerInfo[giveplayerid][Preso] = 120;
}
if(strcmp(result,"CF",true) == 0)
{
result = "Cumplice de fuga";
PlayerInfo[giveplayerid][Preso] = 180;
}
if(strcmp(result,"PIA",true) == 0)
{
result = "Porte inlegal de Arma";
PlayerInfo[giveplayerid][Preso] = 120;
}
format(string, sizeof(string), "*ATENЗГO: %s (%d) agora й um foragido da Polнcia pelo Motivo: %s", giveplayer, giveplayerid, result);
SendClientMessageToAll(0xFF80808B,string);
return 1;
}
else {
format(string, sizeof(string), "%d nгo й um player ativo!", giveplayerid);
SendClientMessage(playerid, COLOR_CYAN, string);
}
}
else {
SendClientMessage(playerid, 0xFF0000D4, "Vocк nгo й um Ofнcial para usar este comando!");
}
return 1;
}
GENTE COMO EU TIRO ESSE BUG QUEM PODE AJUDA O /SU SO TA PEGANDO NO ID 0
Re: [AJUDA]BUG /su -
histire - 11.11.2011
pawn Код:
//----------------------------------[SetCrim]-----------------------------------------------
if(strcmp(cmd, "/suspeito", true) == 0 || strcmp(cmd, "/su", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й um policial!");
return 1;
}
if(OnDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo Bateu o cartгo!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: (/su)speito [id] [Descriзгo do Crime]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsACop(playerid))
{
if(IsPlayerConnected(giveplayerid))
{
if(IsACop(giveplayerid))
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode dar su em Policiais!");
return 1;
}
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
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: (/su)speito [id] [Descriзгo do Crime]");
return 1;
}
SetPlayerCriminal(giveplayerid,playerid, result);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Esse jogador nгo estб conectado.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Vocк nгo й um Policial !");
}
}
return 1;
}
Tenta usar esse xD.
Re: [AJUDA]BUG /su -
lucasoliveira2009 - 11.11.2011
C:\Documents and Settings\Lucas Oliveira\Desktop\Server\gamemodes\RetroxBrasil30SI I.pwn(16339) : error 017:
pawn Код:
undefined symbol "IsACop"
C:\Documents and Settings\Lucas Oliveira\Desktop\Server\gamemodes\RetroxBrasil30SII.pwn(16344) : error 017: undefined symbol "OnDuty"
C:\Documents and Settings\Lucas Oliveira\Desktop\Server\gamemodes\RetroxBrasil30SII.pwn(16344) : warning 215: expression has no effect
C:\Documents and Settings\Lucas Oliveira\Desktop\Server\gamemodes\RetroxBrasil30SII.pwn(16344) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Lucas Oliveira\Desktop\Server\gamemodes\RetroxBrasil30SII.pwn(16344) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lucas Oliveira\Desktop\Server\gamemodes\RetroxBrasil30SII.pwn(16344) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
Re: [AJUDA]BUG /su -
Laercio - 11.11.2011
define o
OnDuty , IsACop
Re: [AJUDA]BUG /su - array13 - 11.11.2011
meta no topo do gamemode
Re: [AJUDA]BUG /su -
lucasoliveira2009 - 11.11.2011
pawn Код:
C:\Documents and Settings\Lucas Oliveira\Desktop\Server\gamemodes\RetroxBrasil30SII.pwn(16346) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lucas Oliveira\Desktop\Server\gamemodes\RetroxBrasil30SII.pwn(16346) : warning 215: expression has no effect
C:\Documents and Settings\Lucas Oliveira\Desktop\Server\gamemodes\RetroxBrasil30SII.pwn(16346) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Lucas Oliveira\Desktop\Server\gamemodes\RetroxBrasil30SII.pwn(16346) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lucas Oliveira\Desktop\Server\gamemodes\RetroxBrasil30SII.pwn(16346) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Re: [AJUDA]BUG /su - array13 - 11.11.2011
mostre as linhas 16345; 16346; 16347
Re: [AJUDA]BUG /su -
lucasoliveira2009 - 11.11.2011
pawn Код:
}
if(OnDuty[playerid] != 1)
{
Re: [AJUDA]BUG /su - array13 - 11.11.2011
}
if(OnDuty[playerid] != 1);
{
Re: [AJUDA]BUG /su -
Pharrel - 11.11.2011
pawn Код:
if(strcmp(cmd, "/su", true) == 0)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
if(PlayerInfo[playerid][BOPE] >= 1 || PlayerInfo[playerid][EX] >= 1 || PlayerInfo[playerid][PMERJ] >= 1)
{
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
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(IsPlayerConnected(giveplayerid))
{
if(!strlen(result))
{
SendClientMessage(playerid,COLOR_GREEN,"Uso correto: /su [id] [motivo]");
return 1;
}
if(strcmp(result,"DOP",true) == 0)
{
result = "Desobediкncia a ordem policial";
PlayerInfo[giveplayerid][Preso] = 120;
}
if(strcmp(result,"TH",true) == 0)
{
result = "Tentativa de Homicidio";
PlayerInfo[giveplayerid][Preso] = 180;
}
if(strcmp(result,"AP",true) == 0)
{
result = "Ajuste de pena";
PlayerInfo[giveplayerid][Preso] = 60;
}
if(strcmp(result,"RV",true) == 0)
{
result = "Roubo de veнculos";
PlayerInfo[giveplayerid][Preso] = 120;
}
if(strcmp(result,"RP",true) == 0)
{
result = "Resistкncia a prisao";
PlayerInfo[giveplayerid][Preso] = 120;
}
if(strcmp(result,"DOP",true) == 0)
{
result = "Desobediкncia a ordem policial";
PlayerInfo[giveplayerid][Preso] = 120;
}
if(strcmp(result,"CF",true) == 0)
{
result = "Cumplice de fuga";
PlayerInfo[giveplayerid][Preso] = 180;
}
if(strcmp(result,"PIA",true) == 0)
{
result = "Porte inlegal de Arma";
PlayerInfo[giveplayerid][Preso] = 120;
}
format(string, sizeof(string), "*ATENЗГO: %s (%d) agora й um foragido da Polнcia pelo Motivo: %s", giveplayer, giveplayerid, result);
SendClientMessageToAll(0xFF80808B,string);
return 1;
}
else
{
format(string, sizeof(string), "%d nгo й um player ativo!", giveplayerid);
SendClientMessage(playerid, COLOR_CYAN, string);
}
}
else SendClientMessage(playerid, 0xFF0000D4, "Vocк nгo й um Ofнcial para usar este comando!");
return 1;
}
Tenta esse й seu comando concertado.