19.10.2013, 09:39
can any one tell me how can i make this stock teleport because this is very long command
help
pawn Код:
new gad = random(sizeof(gads));
new cartype = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,gads[gad][0],gads[gad][1],gads[gad][2]+0.40);
SetPlayerFacingAngle(playerid,gads[gad][3]);
SetPlayerVirtualWorld(playerid,0);
SetVehicleZAngle(cartype,gads[gad][3]);
GameTextForPlayer(playerid,"~y~Telepoted To~n~Gads Airport!",5000,3);
SetPlayerVirtualWorld(playerid,0);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInVehicle(playerid,cartype)== 1)
{
SetVehiclePos(cartype,gads[gad][0],gads[gad][1],gads[gad][2]+0.40);
SetPlayerInterior(playerid,0 );
SetPlayerVirtualWorld(playerid,0);
SetVehicleZAngle(cartype,gads[gad][3]);
GameTextForPlayer(playerid,"~y~Telepoted To~n~Gads Airport!",5000,3);
SetPlayerVirtualWorld(playerid,0);
SetCameraBehindPlayer(playerid);
}
else
{
SetPlayerPos(playerid,gads[gad][0],gads[gad][1],gads[gad][2]+0.40);
SetPlayerFacingAngle(playerid,gads[gad][3]);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetCameraBehindPlayer(playerid);
}
return 1;
}