Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//Thread: http://forum.sa-mp.com/showthread.php?p=3975279
CMD:gotovice(playerid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 696967);
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),696967);
SetVehiclePos(GetPlayerVehicleID(playerid),5017.89203,834.71497,11.0);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 180);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid, 0xFFDD00AA, "* You teleported to Vice City!");
GameTextForPlayer(playerid, "~b~~h~Vice City", 3000, 3);
}
else
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 696967);
SetPlayerPos(playerid,5017.89203,834.71497,11.0);
SetPlayerFacingAngle(playerid, 180);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid, 0xFFDD00AA, "* You teleported to Vice City!");
GameTextForPlayer(playerid, "~b~~h~Vice City", 3000, 3);
}
return 1;
}
CMD:gotolib(playerid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new pveh;
pveh = GetPlayerVehicleID(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 696968);
SetVehicleVirtualWorld(pveh,696968);
RemovePlayerFromVehicle(playerid);//avoiding some weird bug...
SetVehiclePos(pveh,-5240.7021,-372.1064,15.6388);
SetVehicleZAngle(pveh, 180);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid, 0xFFDD00AA, "* You teleported to Liberty City!");
GameTextForPlayer(playerid, "~b~~h~Liberty City", 3000, 3);
PutPlayerInVehicle(playerid,pveh,0);//putting player back...
}
else
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 696968);
SetPlayerPos(playerid,-5228.8399658,-404.5500488,18.2250004);
SetPlayerFacingAngle(playerid, 180);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid, 0xFFDD00AA, "* You teleported to Liberty City!");
GameTextForPlayer(playerid, "~b~~h~Liberty City", 3000, 3);
}
return 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment