#include <a_samp>
#include <zcmd>
CMD:sfairport(playerid,params[])
{
//function
return 1;
}
SetPlayerPos(playerid,YOURCOORDINATESHERE);//set the player position
SetPlayerPos(playerid,-1534.4138,-75.4995,14.1484,307.1554);//set the player position
//-1534.4138,-75.4995,14.1484,307.1554 is my coordinates for sfairport
CMD:sfairport(playerid,params[])
{
SetPlayerPos(playerid,-1534.4138,-75.4995,14.1484,307.1554);
return 1;
}
IsPlayerInAnyVehicle(playerid)
new vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid,-1534.4138,-75.4995,14.1484,307.1554);
if(IsPlayerInAnyVehicle(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid,-1534.4138,-75.4995,14.1484,307.1554);
}
CMD:sfairport(playerid,params[])
{
//checks whether the player is in any vehicle
if(IsPlayerInAnyVehicle(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
//set vehicle position if he is in a vehicle
SetVehiclePos(vehicleid,-1534.4138,-75.4995,14.1484,307.1554);
}
//if the player is on foot
else
{
SetPlayerPos(playerid,-1534.4138,-75.4995,14.1484,307.1554);
}
return 1;
}
SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
CMD:sfairport(playerid,params[])
{
//checks whether the player is in any vehicle
if(IsPlayerInAnyVehicle(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
//set vehicle position if he is in a vehicle
SetVehiclePos(vehicleid,-1534.4138,-75.4995,14.1484,307.1554);
}
//if the player is on foot
else
{
SetPlayerPos(playerid,-1534.4138,-75.4995,14.1484,307.1554);
SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
}
return 1;
}
SendClientMessage(playerid,COLOR,Message);
GameTextForPlayer(playerid,Message,time,style)
SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to sanfierro airport successfully!");
GameTextForPlayer(playerid, "~b~Welcome to~r~ sf airport!", 3000, 3);
CMD:sfairport(playerid,params[])
{
//checks whether the player is in any vehicle
if(IsPlayerInAnyVehicle(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
//set vehicle position if he is in a vehicle
SetVehiclePos(vehicleid,-1534.4138,-75.4995,14.1484,307.1554);
//Gametext and client message for the player
SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to sanfierro airport successfully!");
GameTextForPlayer(playerid, "~b~Welcome to~r~ sf airport!", 3000, 3);
}
//if the player is on foot
else
{
SetPlayerPos(playerid,-1534.4138,-75.4995,14.1484,307.1554);//set the player position
SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
//client message and game text
SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to sanfierro airport successfully!");
GameTextForPlayer(playerid, "~b~Welcome to~r~ sf airport!", 3000, 3);
}
return 1;
}
CMD:teleports(playerid,params[])
{
//function
}
ShowPlayerDialog(playerid,56,DIALOG_STYLE_MSGBOX,"Title","info(what you want to show)","close","");
ShowPlayerDialog(playerid,2316,DIALOG_STYLE_LIST,"Teleports","San fierro Airport\nWang Cars\nOttocars","Select","Close");
ShowPlayerDialog(playerid,dialogid,DIALOG_STYLE_MSGBOX,"Title","Line 1\n line 2\n line 3","Select","Close");
Line 1 line 2 line 3
CMD:teleports(playerid,params[])
{
ShowPlayerDialog(playerid,2316,DIALOG_STYLE_LIST,"Teleports","San fierro Airport\nWang Cars\nOttocars","Select","Close");
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
if(dialogid == 2316)
OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2316)
{
if(response)
OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2316)
{
if(response)
{
switch(listitem)
OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2316)
{
if(response)
{
switch(listitem)
{
OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2316)
{
if(response)
{
switch(listitem)
{
case 0:
case 1:
case 2:
}
}
return 1;
}
return 0;
}
OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2316)
{
if(response)
{
switch(listitem)
{
case 0:SetPlayerPos(playerid,-1534.4138,-75.4995,14.1484,307.1554);
case 1:SetPlayerPos(playerid,-1978.0193,276.1283,35.1719,333.1878);
case 2:SetPlayerPos(playerid,-1637.3621,1208.9797,7.1797,109.3371);
}
}
return 1;
}
return 0;
}
How to make teleport cmd and teleport dialog |