help? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help? (
/showthread.php?tid=489545)
help? -
eblood1 - 23.01.2014
how i can make this work on foot not on vehicle?
Код:
if(areaid == MenuEnter)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float: x, Float: y, Float: z, v = GetPlayerVehicleID(playerid);
GetVehicleVelocity(v, x, y, z);
SetVehiclePos(v, 383.0128,2541.9570,16.5391);
PutPlayerInVehicle(playerid, v, 0);
SetVehicleVelocity(v, x, y, z);
return 1;
}
}
Re: help? -
Hoborific - 23.01.2014
try this, I'm unable to test it.
pawn Код:
if(areaid == MenuEnter)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float: x, Float: y, Float: z, v = GetPlayerVehicleID(playerid);
GetVehicleVelocity(v, x, y, z);
SetVehiclePos(v, 383.0128,2541.9570,16.5391);
PutPlayerInVehicle(playerid, v, 0);
SetVehicleVelocity(v, x, y, z);
return 1;
}
else if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
SetPlayerPos(playerid,383.0128,2541.9570,16.5391);
return 1;
}
}
Re: help? -
eblood1 - 23.01.2014
Quote:
Originally Posted by Hoborific
try this, I'm unable to test it.
pawn Код:
if(areaid == MenuEnter) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { new Float: x, Float: y, Float: z, v = GetPlayerVehicleID(playerid); GetVehicleVelocity(v, x, y, z); SetVehiclePos(v, 383.0128,2541.9570,16.5391); PutPlayerInVehicle(playerid, v, 0); SetVehicleVelocity(v, x, y, z); return 1; } else if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { SetPlayerPos(playerid,383.0128,2541.9570,16.5391); return 1; } }
|
nvm thanks i got it