teleport with vehicle help
#1

this doesnt work
Код:
if(strcmp(cmdtext,"/FH",true)==0)
{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	return SetVehiclePos(vehicleid,846.4355,-2024.6938,12.5638);
	}
	SetPlayerPos(playerid,844.7284,-2024.2441,12.8672);
	return 1;
}
this doesnt either
Код:
if(strcmp(cmdtext, "/drift1", true)==0) //if player types /teleport
{
    if(IsPlayerInAnyVehicle(playerid)) //if player is in any vehicle
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //if player state = driver
        {
            SetVehiclePos(GetPlayerVehicleID(playerid), -358.1943,1531.2909,75.1698 ); //set vehicle pos
            SetVehicleZAngle(GetPlayerVehicleID(playerid), 264.7289); //set vehicle ang
            SetCameraBehindPlayer(playerid); //set camera behind player

        }
        else //player is not the driver
        {
            SendClientMessage(playerid,0xFFFF00AA, "ERROR: You need to be the driver!");
        }
    }
    else //player is not in any vehicle
    {
        SetPlayerPos(playerid, -329.3348,1536.3771,76.6117 ); //set player pos
        SetPlayerFacingAngle(playerid, 276.8851); //set player facing ang
        SetCameraBehindPlayer(playerid); //set camera behind the player
    }
    return 1;
}
help D: they give me alot of errors
Reply
#2

What are the errors?
Reply
#3

errors
Reply
#4

Most likely you mix up your brackets somewhere, meaning you forget to close one or close not on purpose. Just assuming tho'
Reply
#5

could u give me a teleport then?
Reply
#6

Somewhere above your command you either do not close all brackets supposed be closed or you do close one which is not supposed to be closed.

That has nothing to do with your teleport command as such.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)