[Ajuda] comando nгo estб pegando
#1

galera criei este comando agora, mas nгo esta funcionando, alguem poderia me falar qual erro ?

pawn Код:
if(!strcmp(cmdtext, "/mf", true, 3))
       if(dini_Int(file, "Profissao") == MotoqueiroFantasma || dini_Int(file, "aAdmin") == 1)
        {
    if(GetPlayerVehicleID(playerid) == 463)
    {
        fogo = CreateObject(18688, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
        AttachObjectToPlayer(fogo, playerid, 0.0, 0.0, -1.2, 0.0, 0.0, 0);
        SendClientMessage(playerid, -1, "Vocк Esta Em Modo (MF)");
        SetPlayerSkin(playerid, 181);
    }
    return 1;
}
pawn Код:
if(!strcmp(cmdtext, "/dmf", true, 3))
       if(dini_Int(file, "Profissao") == MotoqueiroFantasma || dini_Int(file, "aAdmin") == 1)
{
    if(GetPlayerVehicleID(playerid) == 463)
    {
        DestroyObject(fogo);
        RemovePlayerAttachedObject(playerid, fogo);
        SetPlayerSkin(playerid, 181);
        SendClientMessage(playerid, -1, "Vocк Voltou ao Normal");
    }
    return 1;
}
Reply
#2

Retire o ! do strcmp.
Reply
#3

pawn Код:
C:\Users\Pedro\Desktop\BVP\gamemodes\BVP.pwn(15554) : warning 206: redundant test: constant expression is non-zero
C:\Users\Pedro\Desktop\BVP\gamemodes\BVP.pwn(15554) : error 029: invalid expression, assumed zero
C:\Users\Pedro\Desktop\BVP\gamemodes\BVP.pwn(15554 -- 15555) : warning 215: expression has no effect
C:\Users\Pedro\Desktop\BVP\gamemodes\BVP.pwn(15555) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
pawn Код:
if(cmdtext, "/mf", true, 3))
       if(dini_Int(file, "Profissao") == MotoqueiroFantasma || dini_Int(file, "aAdmin") == 1)
        {
    if(GetPlayerVehicleID(playerid) == 463)
    {
        fogo = CreateObject(18688, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
        AttachObjectToPlayer(fogo, playerid, 0.0, 0.0, -1.2, 0.0, 0.0, 0);
        SendClientMessage(playerid, -1, "Vocк Esta Em Modo (MF)");
        SetPlayerSkin(playerid, 181);
        }
        return 1;
    }
Reply
#4

PHP код:
    if(GetPlayerVehicleID(playerid) == 463
Estб funзгo e para pegar o ID do veiculo e nгo o modelo , o certo seria usar a funзгo :

PHP код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 463
Reply
#5

Mude:
pawn Код:
if(cmdtext, "/mf", true, 3))
Para:
pawn Код:
if(strcmp(cmdtext, "/mf", true, 3))
E Mude:
pawn Код:
if(!strcmp(cmdtext, "/dmf", true, 3))
Para:
pawn Код:
if(strcmp(cmdtext, "/dmf", true, 3))
Era so remover o operador logico !
Reply
#6

Quote:
Originally Posted by darkxdll
Посмотреть сообщение
PHP код:
    if(GetPlayerVehicleID(playerid) == 463
Estб funзгo e para pegar o ID do veiculo e nгo o modelo , o certo seria usar a funзгo :

PHP код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 463
Obrigado, deu certo.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)