[Ajuda] Oque tem de errado neste comando?
#1

Код:
if(strcmp(cmdtext,"/skydive",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Sky Dive ._,",4000,6);
LinkVehicleToInterior(vehicleid,0);
SetPlayerInterior(playerid,0);
return SetVehiclePos(vehicleid,3443.69995117,540.90002441,2014.00000000);
}
SetPlayerPos(playerid,3443.69995117,540.90002441,2014.00000000);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"Sky Dive ._,",4000,6);
return 1;
}
Oque tem de errado?
Reply
#2

pawn Код:
if(strcmp(cmdtext,"/skydive",true)==0)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        LinkVehicleToInterior(GetPlayerVehicleID(playerid),0);
        SetVehiclePos(GetPlayerVehicleID(playerid),3443.69995117,540.90002441,2014.00000000);
    }
    else SetPlayerPos(playerid,3443.69995117,540.90002441,2014.00000000);

    GameTextForPlayer(playerid,"Sky Dive ._.",4000,6);
    SetPlayerInterior(playerid,0);
    return true;
}
Reply
#3

Olha os erros que deu '-'

Код:
(70698) : error 010: invalid function or declaration
(70700) : error 010: invalid function or declaration
(70705) : error 010: invalid function or declaration
(70707) : error 021: symbol already defined: "GameTextForPlayer"
(70709) : error 010: invalid function or declaration
Reply
#4

pawn Код:
if(strcmp(cmdtext,"/skydive",true)==0)
{
        new vehicleid = GetPlayerVehicleID(playerid);
        new State = GetPlayerState(playerid);
        if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
        {
            LinkVehicleToInterior(vehicleid,0);
            SetVehiclePos(vehicleid,3443.69995117,540.90002441,2014.00000000);
        }
        else
        {
                SetPlayerPos(playerid,3443.69995117,540.90002441,2014.00000000);
        }
        SetPlayerInterior(playerid,0);
        GameTextForPlayer(playerid,"Sky Dive ._,",4000,6);
        return true;
}
Reply
#5

pawn Код:
if(strcmp(cmdtext,"/skydive",true)==0)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        LinkVehicleToInterior(GetPlayerVehicleID(playerid),0);
        SetVehiclePos(GetPlayerVehicleID(playerid),3443.69995117,540.90002441,2014.00000000);
    }
    else
    {

        SetPlayerPos(playerid,3443.69995117,540.90002441,2014.00000000);
        GameTextForPlayer(playerid,"Sky Dive ._.",4000,6);
        SetPlayerInterior(playerid,0);
    }
    return true;
}
Reply
#6

O jeito mais completo:

pawn Код:
if(strcmp(cmd,"/skydive",true) == 0)
{
          if(IsPlayerConnected(playerid))
          {
                    if(IsPlayerInAnyVehicle(playerid))
                    {
                              new vehicleid = GetPlayerVehicleID(playerid);

                              SetVehiclePos(vehicleid,3443.60,541.0,2015.0);

                              SendClientMessage(playerid,0xBFBFBFAA,"Bem vindo ao Sky Dive! Vocк veio com um veнculo.");

                              return 1;
                    }
                    else
                    {
                              SetPlayerPos(playerid,3443.60,541.0,2015.0);

                              SendClientMessage(playerid,0xBFBFBFAA,"Bem vindo ao Sky Dive! Vocк veio apй.");

                              return 1;
                    }
          }
          return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)