PDA

View Full Version : /enter [help]


Infinity90
08/04/2012, 02:00 PM
Hello, SA-MP Community, I was wounding how i could make it so that I could use /enter at any SWAT Van and it would put me in a interior that i custom made. Any ideas on how to do this? I have searched and ****** it.

Cjgogo
08/04/2012, 02:13 PM
COMAMND:enter(playerid,params[])
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"This command must be used on SWAT Van!");
else
{
new vehicleid=GetPlayerVehicleID(playerid);
if(vehicleid==601) SetPlayerInterior(playerid,custom alien interior made by you id);
else SendClientMessage(playerid,COLOR_RED,"This command must be used on SWAT Van!");
}
return 1;
}

Infinity90
08/04/2012, 02:23 PM
Thanks!!! YOUR AWSOME DUDE (: + Rep'd you

Infinity90
08/04/2012, 02:26 PM
Would you be able to use /enter anywhere thou?

Kindred
08/04/2012, 02:36 PM
Considering the fact if you were to read his command, it states that if the player is in any vehicle it continues, and if he is in the vehicleid of 601, it would allow you to enter. So no.

Infinity90
08/04/2012, 02:45 PM
I get this error warning 203: symbol is never used: "enter"
EDIT: Fixed ^
Also how would i make A /exit command so where ever the vehicle stops someone can Exit at that position?

Infinity90
08/04/2012, 04:16 PM
Ok quick bug it doesnt let me enter the vehicle. :/
CMD:entervan(playerid,params[])
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"This command must be used on SWAT Van!");
else
{
new vehicleid=GetPlayerVehicleID(playerid);
if(vehicleid==427)
SetPlayerPos(playerid,-26.2717,42.6422,1000.3384);
else SendClientMessage(playerid,COLOR_RED,"This command must be used near a Enforcer!");
}
return 1;
}