06.01.2011, 19:02
Quote:
Thiago depois que coloquei esse codigo deu 10 errors:
Code:
C:\Documents and Settings\day\Meus documentos\Downloads\BLG 1.0\gamemodes\gamerx.pwn(31831) : warning 219: local variable "PlayerName" shadows a variable at a preceding level C:\Documents and Settings\day\Meus documentos\Downloads\BLG 1.0\gamemodes\gamerx.pwn(37167) : warning 219: local variable "PlayerName" shadows a variable at a preceding level C:\Documents and Settings\day\Meus documentos\Downloads\BLG 1.0\gamemodes\gamerx.pwn(56010) : error 025: function heading differs from prototype C:\Documents and Settings\day\Meus documentos\Downloads\BLG 1.0\gamemodes\gamerx.pwn(56014) : error 017: undefined symbol "PlayerName" C:\Documents and Settings\day\Meus documentos\Downloads\BLG 1.0\gamemodes\gamerx.pwn(56015) : error 017: undefined symbol "Ano" C:\Documents and Settings\day\Meus documentos\Downloads\BLG 1.0\gamemodes\gamerx.pwn(56016) : error 017: undefined symbol "Dia" C:\Documents and Settings\day\Meus documentos\Downloads\BLG 1.0\gamemodes\gamerx.pwn(56017) : error 017: undefined symbol "Hora" C:\Documents and Settings\day\Meus documentos\Downloads\BLG 1.0\gamemodes\gamerx.pwn(56018) : error 017: undefined symbol "Hora" C:\Documents and Settings\day\Meus documentos\Downloads\BLG 1.0\gamemodes\gamerx.pwn(56019) : error 017: undefined symbol "gstring" C:\Documents and Settings\day\Meus documentos\Downloads\BLG 1.0\gamemodes\gamerx.pwn(56019) : warning 215: expression has no effect C:\Documents and Settings\day\Meus documentos\Downloads\BLG 1.0\gamemodes\gamerx.pwn(56019) : error 001: expected token: ";", but found "]" C:\Documents and Settings\day\Meus documentos\Downloads\BLG 1.0\gamemodes\gamerx.pwn(56019) : error 029: invalid expression, assumed zero C:\Documents and Settings\day\Meus documentos\Downloads\BLG 1.0\gamemodes\gamerx.pwn(56019) : fatal error 107: too many error messages on one line Outra coisa o /sequestrar que o cara ali passou nгo funcionou, conseguem sair do carro do mesmo jeito, sу aperta F ou Enter que sai do carro mesmo sequestrado, aqui o code do comando /sequestrar: Code:
if(strcmp(cmd, "/sequestrar", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMembro] == 5 || PlayerInfo[playerid][pLider] == 5 || PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6 || PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15 || PlayerInfo[playerid][pMembro] == 16 || PlayerInfo[playerid][pLider] == 16 || PlayerInfo[playerid][pMembro] == 18 || PlayerInfo[playerid][pLider] == 18 || PlayerInfo[playerid][pMembro] == 19 || PlayerInfo[playerid][pLider] == 19 || PlayerInfo[playerid][pMembro] == 21 || PlayerInfo[playerid][pLider] == 21 || PlayerInfo[playerid][pMembro] == 27 || PlayerInfo[playerid][pLider] == 27) { if(PlayerInfo[playerid][pCargo] < 3) { SendClientMessage(playerid, COLOR_GREY, " Vocк precisa de cargo 3 ou mais para amarrar as pessoas. !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USE: /sequestrar [ id ]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(PlayerTied[giveplayerid] > 0) { SendClientMessage(playerid, COLOR_GREY, " O Jogador jб estб sequestrado !"); return 1; } if (ProxDetectorS(8.0, playerid, giveplayerid)) { new car = GetPlayerVehicleID(playerid); if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode amarrar а vocк mesmo.!"); return 1; } if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* Vocк foi sequestrado por %s.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Vocк sequestrou %s.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s sequestra %s, entгo ele nгo irб а lugar algum.", sendername ,giveplayer); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GameTextForPlayer(giveplayerid, "~r~Sequestrado", 2500, 3); TogglePlayerControllable(giveplayerid, 1); PlayerTied[giveplayerid] = 1; PlayerCuffedTime[giveplayerid] = 99999999999999; } else { SendClientMessage(playerid, COLOR_GREY, " O Jogador nгo estб no seu carro, ou vocк nгo й o motorista !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " O Jogador esta longe de voce !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " O Jogador Esta Offline !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й de uma Org. criminosa !"); } } return 1; } |
@EDIT
Arrumei o sequestrar tenta ae
pawn Code:
if(strcmp(cmd, "/sequestrar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMembro] == 5 || PlayerInfo[playerid][pLider] == 5 || PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6 || PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15 || PlayerInfo[playerid][pMembro] == 16 || PlayerInfo[playerid][pLider] == 16 || PlayerInfo[playerid][pMembro] == 18 || PlayerInfo[playerid][pLider] == 18 || PlayerInfo[playerid][pMembro] == 19 || PlayerInfo[playerid][pLider] == 19
|| PlayerInfo[playerid][pMembro] == 21 || PlayerInfo[playerid][pLider] == 21 || PlayerInfo[playerid][pMembro] == 27 || PlayerInfo[playerid][pLider] == 27)
{
if(PlayerInfo[playerid][pCargo] < 3)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк precisa de cargo 3 ou mais para amarrar as pessoas. !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USE: /sequestrar [ id ]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerTied[giveplayerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, " O Jogador jб estб sequestrado !");
return 1;
}
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
new car = GetPlayerVehicleID(playerid);
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode amarrar а vocк mesmo.!"); return 1; }
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Vocк foi sequestrado por %s.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Vocк sequestrou %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s sequestra %s, entгo ele nгo irб а lugar algum.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(giveplayerid, "~r~Sequestrado", 2500, 3);
TogglePlayerControllable(giveplayerid, 0);
PlayerTied[giveplayerid] = 1;
PlayerCuffedTime[giveplayerid] = 99999999999999;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " O Jogador nгo estб no seu carro, ou vocк nгo й o motorista !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " O Jogador esta longe de voce !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " O Jogador Esta Offline !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й de uma Org. criminosa !");
}
}
return 1;
}