19.10.2013, 09:43
pawn Код:
stock TPMe(playerid)
{
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;
}
}
pawn Код:
CMD:teleport(playerid,params[])
{
TPMe(playerid);
return 1;
}