Typing /enter with a car :/ -
Luis- - 11.08.2010
I would like to know how to enter/exit a building with a car?
Re: Typing /enter with a car :/ -
pmk1 - 12.08.2010
you must do something in your command like
if IsPlayerInVehicle(playerid)
{ //your command, plus somehting with attachvechiletointerior and setvehiclepos
return 1;
}
i think :\
Re: Typing /enter with a car :/ -
Luis- - 12.08.2010
I need a better explanation D:
Re: Typing /enter with a car :/ -
CSMajor - 12.08.2010
pawn Код:
if(!strcmp(cmdtext,"/enter",true,6)) return SendClientMessage(playerid,0xFFF0000FF,"USAGE: /enter [Interior ID]");
{
if(IsPlayerInVehicle(playerid))
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid),cmdtext[7]);
}
else
{
SendClientMessage(playerid,0xFFF0000FF,"You Are Not In A Vehicle!");
}
return 1;
}
please post the errors you get as i have not tested it
Re: Typing /enter with a car :/ -
pmk1 - 12.08.2010
or you can do
pawn Код:
if(!strcmp(cmdtext,"/enter",true,6))
{
if(IsPlayerInVehicle(playerid))
{
SetPlayerinterior(playerid, id)
LinkVehicleToInterior(GetPlayerVehicleID(playerid),cmdtext[7]);
SetVehiclePos(playerid, X,Y,Z,A) // not sure of it :\ makes a while i ddidnt use that
}
else
{
SetPlayerinterior(playerid, id)
SetPlayerPos(playerid, X,Y,Z,A) // not sure of it :\ makes a while i ddidnt use that
}
return 1;
}
or something like that :P hope this helps
and as i said, i'm not totaly sure it works cuz it makes a while i didnt pawnoed xd
Re: Typing /enter with a car :/ -
CSMajor - 12.08.2010
the other dudes below me well his wont work because he had to define id and alot of other stuff like xyz etc
Re: Typing /enter with a car :/ -
Thebest96 - 12.08.2010
Quote:
Originally Posted by pmk1
or you can do
pawn Код:
if(!strcmp(cmdtext,"/enter",true,6)) { if(IsPlayerInVehicle(playerid)) { SetPlayerinterior(playerid, id) LinkVehicleToInterior(GetPlayerVehicleID(playerid),cmdtext[7]); SetVehiclePos(playerid, X,Y,Z,A) // not sure of it :\ makes a while i ddidnt use that } else { SetPlayerinterior(playerid, id) SetPlayerPos(playerid, X,Y,Z,A) // not sure of it :\ makes a while i ddidnt use that } return 1; }
or something like that :P hope this helps and as i said, i'm not totaly sure it works cuz it makes a while i didnt pawnoed xd
|
THANKS!!!! helped me a lot.
Re: Typing /enter with a car :/ -
Mike_Peterson - 12.08.2010
Quote:
Originally Posted by CSMajor
pawn Код:
if(!strcmp(cmdtext,"/enter",true,6)) return SendClientMessage(playerid,0xFFF0000FF,"USAGE: /enter [Interior ID]"); { if(IsPlayerInVehicle(playerid)) { LinkVehicleToInterior(GetPlayerVehicleID(playerid),cmdtext[7]); } else { SendClientMessage(playerid,0xFFF0000FF,"You Are Not In A Vehicle!"); } return 1; }
please post the errors you get as i have not tested it
|
cmdtext = /enter
cmd = /enter (id)
:P so use
if(!strcmp(cmd(deleted text),"/enter",true,6)) return SendClientMessage(playerid,0xFFF0000FF,"USAGE: /enter [Interior ID]");
Re: Typing /enter with a car :/ -
sekol - 12.08.2010
Quote:
Originally Posted by pmk1
or you can do
pawn Код:
if(!strcmp(cmdtext,"/enter",true,6)) { if(IsPlayerInVehicle(playerid)) { SetPlayerinterior(playerid, id) LinkVehicleToInterior(GetPlayerVehicleID(playerid),cmdtext[7]); SetVehiclePos(playerid, X,Y,Z,A) // not sure of it :\ makes a while i ddidnt use that } else { SetPlayerinterior(playerid, id) SetPlayerPos(playerid, X,Y,Z,A) // not sure of it :\ makes a while i ddidnt use that } return 1; }
or something like that :P hope this helps and as i said, i'm not totaly sure it works cuz it makes a while i didnt pawnoed xd
|
How should i replace "A" ?
Re: Typing /enter with a car :/ -
sekol - 12.08.2010
Quote:
Originally Posted by sekol
How should i replace "A" ?
|
And what does mean
Shit, i wished to edit it, not doublepost. Sorry guys