i want a script so tht i can teleport to lsa, lva or sfa and on teleporting i should get the car spawning menu
pawn Код:
CMD:lsa(playerid,params[]) {
#pragma unused params
if(AccInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment!");
TeleTimer[playerid] = SetTimerEx("ttimer", 1000, true, "i",playerid);
tseconds[playerid] = 0;
format(tstring,45,"You Must wait %d seconds before teleporting", tseconds[playerid]-1);
if(AccInfo[playerid][Level] == 0) SendClientMessage(playerid,COLOR_LIGHTBLUE, tstring);
Tx[playerid] =1477.4083;
Ty[playerid] =1761.8549;
Tz[playerid] =10.8125;
Ti[playerid] = 0;
new string[128];
new dsname[MAX_PLAYER_NAME];
format(telestring,43,"Las Santos Airport!");
GetPlayerName(playerid, dsname, sizeof(dsname));
format(string, sizeof(string), "%s has just teleported to LS Airport /lsa", dsname);
SendClientMessageToAll(COLOR_YELLOW, string);
SetTimerEx("setstunt",3000,0,"i", playerid);
ShowPlayerDialog( playerid, DIALOGID3+40, DIALOG_STYLE_LIST, "Vehicle Types", "nBikes\nConvertibles\nIndustrial\nLowriders\nOff Road\nPublic Service Vehicles\nSaloons\nSport Vehicles\nStation Wagons", "Select", "Cancel" );
return 1;
}
CMD:sfa(playerid,params[]) {
#pragma unused params
if(AccInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment!");
TeleTimer[playerid] = SetTimerEx("ttimer", 1000, true, "i",playerid);
tseconds[playerid] = 6;
format(tstring,45,"You Must wait %d seconds before teleporting", tseconds[playerid]-1);
if(AccInfo[playerid][Level] == 0) SendClientMessage(playerid,COLOR_LIGHTBLUE, tstring);
Tx[playerid] =-1657.5400;
Ty[playerid] =-164.9457;
Tz[playerid] =14.1484;
Ti[playerid] = 0;
new string[128];
new dsname[MAX_PLAYER_NAME];
format(telestring,43,"San Fierro Airport!");
GetPlayerName(playerid, dsname, sizeof(dsname));
format(string, sizeof(string), "%s has just teleported to SF Airport /sfa", dsname);
SendClientMessageToAll(COLOR_YELLOW, string);
SetTimerEx("setstunt",3000,0,"i", playerid);
ShowPlayerDialog( playerid, DIALOGID3+40, DIALOG_STYLE_LIST, "Vehicle Types", "nBikes\nConvertibles\nIndustrial\nLowriders\nOff Road\nPublic Service Vehicles\nSaloons\nSport Vehicles\nStation Wagons", "Select", "Cancel" );
return 1;
}
CMD:lva(playerid,params[]) {
#pragma unused params
if(AccInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment!");
TeleTimer[playerid] = SetTimerEx("ttimer", 1000, true, "i",playerid);
tseconds[playerid] = 6;
format(tstring,45,"You Must wait %d seconds before teleporting", tseconds[playerid]-1);
if(AccInfo[playerid][Level] == 0) SendClientMessage(playerid,COLOR_LIGHTBLUE, tstring);
Tx[playerid] =1477.4083;
Ty[playerid] =1761.8549;
Tz[playerid] =10.8125;
Ti[playerid] = 0;
new string[128];
new dsname[MAX_PLAYER_NAME];
format(telestring,43,"Las Venturas Airport!");
GetPlayerName(playerid, dsname, sizeof(dsname));
format(string, sizeof(string), "%s has just teleported to LV Airport /lva", dsname);
SendClientMessageToAll(COLOR_YELLOW, string);
SetTimerEx("setstunt",3000,0,"i", playerid);
ShowPlayerDialog( playerid, DIALOGID3+40, DIALOG_STYLE_LIST, "Vehicle Types", "nBikes\nConvertibles\nIndustrial\nLowriders\nOff Road\nPublic Service Vehicles\nSaloons\nSport Vehicles\nStation Wagons", "Select", "Cancel" );
return 1;
}
pawn Код:
// Show the dialog when using the commands:
// so for example: lsa
dcmd_lsa(playerid, params[]) {
#pragma unused params
ShowPlayerDialog( playerid, DIALOGID3+40, DIALOG_STYLE_LIST, "Vehicle Types", "nBikes\nConvertibles\nIndustrial\nLowriders\nOff Road\nPublic Service Vehicles\nSaloons\nSport Vehicles\nStation Wagons", "Select", "Cancel" );
}
// then when a player chose a vehicle, teleport them (use OnDialogResponse)
public OnDialogResponse(playerid, dialogid, ...) {
if(dialogid == DIALOGID3+40) {
if(response) {
// teleport them
}
}
}