02.07.2018, 10:20
(
Последний раз редактировалось Wherethescripters; 02.07.2018 в 12:21.
)
Guys i just made a new cmd with dialog /licenses and i want some help!! Its for freeroam/roleplay! I made cmd + dialog response also and i made 3 license options! driving lic+bike lic+flying+lic now i want this that if i will click on driving school it will tp me there and if i will tp on bike school it will tp me there and if i will click on flying school it will tp me there, i made SetPlayerPos and i entered driving school position, when i click on driving school it tp me there and whenever i click on bike or flying school it also tp me to driving school so plz help me!!
Here's The Code
EDIT:SetPlayerPos(playerid, -2026.662, -91.409, 35.320); this is position for driving school!
Again Edit: If the player already has license like driving license, he will type /licenses and when he will click on driving license it will show that you already have that license, i want same with other licenses..
Here's The Code
PHP код:
CMD:licenses(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_LICENSES, DIALOG_STYLE_LIST, "Licenses", "{FF0000}Driving License\n{0000FF}Bike License\n{00FF00}Flying License", "Select", "Cancel");
return 1;
}
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
pdialog[playerid] = -1;
new string[256], tmp2[256], playername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME], tmp[256], temp1, temp2, temp3;
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
if(dialogid == DIALOG_LICENSES)
{
if (response)
{
if (dini_Isset(AddDirFile(dir_userfiles, playername), "license")) return SendClientMessage2(playerid,
COLOR_RED, "You already have that license, drive to the school!");
if (GetPlayerWantedLevel(playerid) != 0) return SendClientMessage2(playerid, COLOR_RED, "You are a wanted player, so you cannot teleport to the school!");
SetPlayerPos(playerid, -2026.662, -91.409, 35.320);
}
return 1;
}
Again Edit: If the player already has license like driving license, he will type /licenses and when he will click on driving license it will show that you already have that license, i want same with other licenses..