PDA

View Full Version : Interior Problem


Barnwell
10/07/2017, 02:31 AM
Can anyone help me
I made a /enter command for a storage
but I don't know when I /enter the storage interior I can't enter with a car I don't know why
anyone can help?

Alex_T
10/07/2017, 02:33 AM
http://wiki.sa-mp.com/wiki/SetVehiclePos

Check this out, replace SetPlayerPos with this to tp a vehicle

If you need to tp a person into the spot when they are not in a car you would want to use something like this.

if(IsPlayerInAnyVehicle(playerid) {
SetVehiclePos(X, Y, Z);
} else {
SetPlayerPos(playerid, X, Y, Z);
}

Barnwell
10/07/2017, 02:35 AM
Thanks but I need the both of it
Like everyone can enter the storage with a car or without a car.

Alex_T
10/07/2017, 02:36 AM
I edited my post check it out.

Barnwell
10/07/2017, 02:43 AM
wcrp\interiors.pwn(172) : error 001: expected token: ")", but found "{"

if(IsPlayerInAnyVehicle(playerid) {
SetVehiclePos(X, Y, Z);
} else {
SetPlayerPos(playerid, X, Y, Z);
}

DTV
10/07/2017, 02:44 AM
Needs to be if(IsPlayerInAnyVehicle(playerid)).

Barnwell
10/07/2017, 03:28 AM
This restart my server
btw I fix it :D