Teleport cars HELP!!! -
FireCat - 15.08.2010
please anyone help me!!!!!!!
i made a command that teles a player but if he is in a car i want it to tele him and the car i can do it no probs but it dosnt put him in the car so i tried to make it it works but i get this with server unknown command
:
then if he isnt in a car it dosnt tele him it gives the same error and it dosnt tele!!!
help me please!!!!
code is:
PHP Code:
if (IsPlayerInAnyVehicle(playerid)== 1)
SetVehiclePos(GetPlayerVehicleID(playerid), 1458.1984,1559.2050,10.8125);
PutPlayerInVehicle(playerid);
}else{
SendClientMessage(playerid,COLOR_GREEN, "Welcome to Stunt2");
SetPlayerPos(playerid,1458.1984,1559.2050,10.8125);
return 1;
}
Re: Teleport cars HELP!!! -
Dark_Kostas - 15.08.2010
pawn Code:
if(IsPlayerInAnyVehicle(playerid)) SetVehiclePos(GetPlayerVehicleID(playerid), 1458.1984,1559.2050,10.8125);
else SetPlayerPos(playerid,1458.1984,1559.2050,10.8125);
SendClientMessage(playerid,COLOR_GREEN, "Welcome to Stunt2");
//return and end your command with }
You can use [ pawn] and [ /pawn] btw.
Re: Teleport cars HELP!!! -
FireCat - 15.08.2010
THANKS
DDDDDDDDDDDDDDDDDDDDDDDDDDD it worked!!!!!
Re: Teleport cars HELP!!! -
Vince - 15.08.2010
Braces don't match. Does that even compile?
And like I already said in one of your previous topics, PutPlayerInVehicle has two additional parameters.
pawn Code:
new
vehicleid = GetPlayerVehicleID(playerid);
if (vehicleid)
{
SetVehiclePos(vehicleid, 1458.1984,1559.2050,10.8125);
PutPlayerInVehicle(playerid, vehicleid, 0);
}
else
{
SetPlayerPos(playerid,1458.1984,1559.2050,10.8125);
}
SendClientMessage(playerid,COLOR_GREEN, "Welcome to Stunt2");
return 1;
Re: Teleport cars HELP!!! - Guest3598475934857938411 - 15.08.2010
Learn to search even ******* have a tutorial! Here:
[pawn] if(strcmp(cmdtext,"teleport",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
LinkVehicleToInterior(vehicleid,**Interior**);
SetPlayerInterior(playerid,**Interior**);
return SetVehiclePos(vehicleid,**Co-ords**);
}
SetPlayerPos(playerid,**Co-ords**);
SetPlayerInterior(playerid,**Interior**);
return 1;
}
[/pawn[
Don't waste my time! This is also copied from a tutorial.
Re: Teleport cars HELP!!! -
CSMajor - 16.08.2010
Quote:
Originally Posted by expertprogrammer
Learn to search even ******* have a tutorial! Here:
[pawn] if(strcmp(cmdtext,"teleport",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
LinkVehicleToInterior(vehicleid,**Interior**);
SetPlayerInterior(playerid,**Interior**);
return SetVehiclePos(vehicleid,**Co-ords**);
}
SetPlayerPos(playerid,**Co-ords**);
SetPlayerInterior(playerid,**Interior**);
return 1;
}
[/pawn[
Don't waste my time! This is also copied from a tutorial.
|
How about you become a nice person, and learn to speak English.. Or don't post.
Re: Teleport cars HELP!!! -
[MWR]Blood - 16.08.2010
Quote:
Originally Posted by expertprogrammer
Learn to search even ******* have a tutorial!
Don't waste my time! This is also copied from a tutorial.
|
The scripting discussion board is created for asking help, stop "wasting your time" with arguing here, it's not the right place for that.
Also, if you read carefully the previous posts, you'll see that the problem has been solved before you posted your crappy post.
Re: Teleport cars HELP!!! -
FireCat - 16.08.2010
yeh that expertprogrammer is a bit out of order here its a scripting boar people ask questions to each other and friendly people help!!! and ur code i wrong i need to define stuff but since u were lasy im going to and remeber when u copyed my gamemode?ok...