29.01.2011, 07:53
(
Последний раз редактировалось Haydz; 29.01.2011 в 08:45.
)
Hey guys, how can i display either "Clear" or "In Use" depending of value of a certain varabile.
As you can see i'v put %s beside runways 9L and R. so if a player types /land it will declare a certain a certain runway varabile to "1"
here the /land command.
so if LV9R was varabile = 1
and LV9L was varabile = 0
The dialog would display
LV9R - In Use
LV9L - Clear.
Not really sure what i would use considering i havn't done anything like this before.
pawn Код:
new string[170];
format(string,sizeof(string),"Las Venturas Airport Information\n\t- Active Runways\n\t\t27L -\tInUse\n\t\t27R -\tClear\n\t\t9L -\t%s\n\t\t9R -\t%s\n\t- Active Aircrafts\t- %d\n\t- Windspeed(Knots)\t- %d",
aircraftcount,GetPVarInt(playerid,"randomknots"));
ShowPlayerDialog(playerid, LVAIRPORTDISPLAY, DIALOG_STYLE_LIST, "Air Traffic Control",string, "Ok", "Exit");
here the /land command.
pawn Код:
if (IsPlayerInRangeOfPoint(playerid, 700, 1306.2268, 1262.2083, 14.2656) == 1)
{
if (LV9L == 1)
{
LV9L = 1;
SetTimerEx("timer_reset", 20000, false, "i", 1);
GameTextForPlayer(playerid, "You're allowed to land at Las venturas Airport 9L", 6500, 6);
format(string, sizeof string, "%s@Radio: is landing at LV9L", PlayerInfo[playerid][CallSign]) && SendClientMessageToAll(COLOR_GREY, string);
}
if (LV9R == 1)
{
LV9R = 1;
SetTimerEx("timer_reset", 20000, false, "i", 1);
GameTextForPlayer(playerid, "You're allowed to land at Las venturas Airport 9R", 6500, 6);
format(string, sizeof string, "%s@Radio: is landing at LV9R", PlayerInfo[playerid][CallSign]) && SendClientMessageToAll(COLOR_GREY, string);
}
}
and LV9L was varabile = 0
The dialog would display
LV9R - In Use
LV9L - Clear.
Not really sure what i would use considering i havn't done anything like this before.