PDA

View Full Version : setplayerpos


Airblog
30/11/2014, 02:52 PM
Hi all
i want to create a biz spray
and i use SetPlayerPos
But my vehicle doesn't teleport in spray and just teleport myself
Plz Help

AnthonyTimmers
30/11/2014, 03:29 PM
Try this.


if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
}
else
{
SendClientMessage(playerid, COLOR_RED, "ERROR: You need to be the driver!");
}
}
else
{
SetPlayerPos(playerid, X, Y, Z);
}


+Rep if it helped you ;)

Airblog
30/11/2014, 04:51 PM
Try this.


if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
}
else
{
SendClientMessage(playerid, COLOR_RED, "ERROR: You need to be the driver!");
}
}
else
{
SetPlayerPos(playerid, X, Y, Z);
}


+Rep if it helped you ;)

Tnx For Help its working +rep