[ERROS]Teleport com carro =x
#1

Ola, criei um teleporte q teleporta junto o carro, ele verifica se o player estб com carro, e dps verifica se o player esta com o veiculo id 562(elegy) e se sim ele teleporta o cara para o lugar destinado com o carro se nao ele teleporta sem o carro, ate ae tudo bem, mas tentto compilar e da os seguitnes erros --'
Код:
C:\Users\kurosaki\Desktop\Nova pasta (2)\meugm.pwn(616) : error 001: expected token: ")", but found "{"
C:\Users\kurosaki\Desktop\Nova pasta (2)\meugm.pwn(629) : error 010: invalid function or declaration

Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
pawn Код:
if(!strcmp("/ddc2", cmdtext, true)){
        if(IsPlayerInAnyVehicle(playerid)){
        if(GetVehicleModel(GetPlayerVehicleID(playerid) == 562){
        new ddc2tele;
        ddc2tele = GetPlayerVehicleID(playerid);
        SetVehiclePos(ddc2tele, 2291.7197,1392.2921,42.8203);
        }
        }
        else {
        SetPlayerPos(playerid, 2291.7197,1392.2921,42.8203);
        }
        }
         
         return 1;
        }
        return 0;
}
Reply
#2

tenta
pawn Код:
if(strcmp(cmd, "/ddc2", true) == 0)
{
       if(IsPlayerInAnyVehicle(playerid)){
        if(GetVehicleModel(GetPlayerVehicleID(playerid) == 562){
        new ddc2tele;
        ddc2tele = GetPlayerVehicleID(playerid);
        SetVehiclePos(ddc2tele, 2291.7197,1392.2921,42.8203);
        }
        }
        else {
        SetPlayerPos(playerid, 2291.7197,1392.2921,42.8203);
        }
        }
         
         return 1;
        }
        return 0;
}
espero ter ajudado
Reply
#3

pawn Код:
if(strcmp(cmd, "/ddc2", true) == 0)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 562)
        {
            new ddc2tele;
            ddc2tele = GetPlayerVehicleID(playerid);
            SetVehiclePos(ddc2tele, 2291.7197,1392.2921,42.8203);
        }
    }
    else
    {
        SetPlayerPos(playerid, 2291.7197,1392.2921,42.8203);
    }
    return 1;
}
Ou...

pawn Код:
if(strcmp(cmd, "/ddc2", true) == 0)
{
    if(!IsPlayerInAnyVehicle(playerid)) return SetPlayerPos(playerid, 2291.7197,1392.2921,42.8203);
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 562) return SetVehiclePos(GetPlayerVehicleID(playerid), 2291.7197,1392.2921,42.8203);
    return 1;
}
Reply
#4

Код:
if(strcmp(cmdtext, "/SeuTele", true) == 0) {
    if(IsPlayerInAnyVehicle(playerid)) {// *
    new VehicleID; //*
    VehicleID = GetPlayerVehicleID(playerid); //*
    SetVehiclePos(VehicleID,-2351.763,-1644.297,483.363); // aqui й o local que ele vai ser teleportado junto ao veнculo
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
    format(string, sizeof(string), "[TELE] O jogador %s foi para o Mont Chiliad( /montchiliad )", pname); // exemplo mont chiliad
    SendClientMessageToAll(COLOR_YELLOW, string);
    ResetPlayerWeapons(playerid); // reseta as armas
    SetPlayerInterior(playerid,0);
    }
    else{
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
    format(string, sizeof(string), "[TELE] O jogador %s foi para o Mont Chiliad( /montchiliad )", pname); // nгo retirar
    SendClientMessageToAll(COLOR_YELLOW, string);
    ResetPlayerWeapons(playerid);
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,-2351.763,-1644.297,483.363);// aqui a mesma coordenada de onde irб ser teleportado
    }
    return 1;
    }
Reply
#5

obrigado pessoal =D
mim ajudaram bastante =D
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)