23.12.2010, 13:13
I did it ![Tongue](images/smilies/razz.gif)
I hope that i have helped
![Tongue](images/smilies/razz.gif)
pawn Код:
forward timer_reset(airfield);
public timer_reset(airfield)
{
switch(airfield) {
case 0: lsa = 0;
case 1: lva = 0;
case 2: sfa = 0;
case 3: a69 = 0;
}
}
forward timer_transmitted(land,playerid);
public timer_transmitted(land,playerid)
{
new pName[MAX_PLAYER_NAME];
new string[128];
if (land == 1) {
switch(GetVehicleModel(GetPlayerVehicleID(playerid))) {
case 520 , 577 , 511 , 592 , 512 , 513 , 519 , 593 , 553 , 476:
{
//lsa
if (IsPlayerInRangeOfPoint(playerid,700,2061.8948,-2379.8354,16.1250) == 1) {
if (lsa == 0) {
lsa = 1;
SetTimerEx("timer_reset",20000,false,"i",0);
format(string,sizeof(string),"~w~Los Santos Airport: ~g~You are allowed to land.");
GameTextForPlayer(playerid,string,6500,6);
GetPlayerName(playerid,pName,64);
format(string,sizeof(string),"Radio: %s is landing at Lsa",pName);
SendClientMessageToAll(COLOR_RADIO,string);
}
else {
format(string,sizeof(string),"~w~Los Santos Airport: ~r~Negative, runway in-use");
GameTextForPlayer(playerid,string,6500,6);
}
//lva
} else if (IsPlayerInRangeOfPoint(playerid,700,1306.2268,1262.2083,14.2656 ) == 1)
{
if (lva == 0) {
lva = 1;
SetTimerEx("timer_reset",20000,false,"i",1);
format(string,sizeof(string),"~w~Las Venturas Airport: ~g~You are allowed to land.");
GameTextForPlayer(playerid,string,6500,6);
GetPlayerName(playerid,pName,64);
format(string,sizeof(string),"Radio: %s is landing at LVA",pName);
SendClientMessageToAll(COLOR_RADIO,string);
}
else {
format(string,sizeof(string),"~w~Las Venturas Airport: ~r~Negative, runway in-use");
GameTextForPlayer(playerid,string,6500,6);
}
//sfa
} else if (IsPlayerInRangeOfPoint(playerid,700,-1294.7537,62.1835,14.1484) == 1)
{
if (sfa == 0) {
sfa = 1;
SetTimerEx("timer_reset",20000,false,"i",2);
format(string,sizeof(string),"~w~San Fierro Airport: ~g~You are allowed to land.");
GameTextForPlayer(playerid,string,6500,6);
GetPlayerName(playerid,pName,64);
format(string,sizeof(string),"Radio: %s is landing at SFA",pName);
SendClientMessageToAll(COLOR_RADIO,string);
}
else {
format(string,sizeof(string),"~w~San Fierro Airport: ~r~Negative, runway in-use");
GameTextForPlayer(playerid,string,6500,6);
}
//a69
} else if (IsPlayerInRangeOfPoint(playerid,500,312.1916,2011.1819,17.6406) == 1)
{
if (a69 == 0) {
a69 = 1;
SetTimerEx("timer_reset",20000,false,"i",4);
format(string,sizeof(string),"~w~Area 69: ~g~You are allowed to land.");
GameTextForPlayer(playerid,string,6500,6);
GetPlayerName(playerid,pName,64);
format(string,sizeof(string),"Radio: %s is landing at A69",pName);
SendClientMessageToAll(COLOR_RADIO,string);
}
else {
format(string,sizeof(string),"~w~Area 69: ~r~Negative, runway in-use");
GameTextForPlayer(playerid,string,6500,6);
}
}
else {
format(string,sizeof(string),"~r~Could not transmit to any nearby airport!");
GameTextForPlayer(playerid, string,6500,6);
}
}
}
}
else {
switch(GetVehicleModel(GetPlayerVehicleID(playerid))) {
case 520 , 577 , 511 , 592 , 512 , 513 , 519 , 593 , 553 , 476:
{
//lsa
if (IsPlayerInRangeOfPoint(playerid,700,2061.8948,-2379.8354,16.1250) == 1) {
if (lsa == 0) {
lsa = 1;
SetTimerEx("timer_reset",20000,false,"i",0);
format(string,sizeof(string),"~w~Los Santos Airport: ~g~You are allowed to takeoff.");
GameTextForPlayer(playerid,string,6500,6);
GetPlayerName(playerid,pName,64);
format(string,sizeof(string),"Radio: %s is taking off from LSA",pName);
SendClientMessageToAll(COLOR_RADIO,string);
}
else {
format(string,sizeof(string),"~w~Los Santos Airport: ~r~Negative, runway in-use");
GameTextForPlayer(playerid,string,6500,6);
}
//lva
} else if (IsPlayerInRangeOfPoint(playerid,700,1306.2268,1262.2083,14.2656 ) == 1)
{
if (lva == 0) {
lva = 1;
SetTimerEx("timer_reset",20000,false,"i",1);
format(string,sizeof(string),"~w~Las Venturas Airport: ~g~You are allowed to takeoff.");
GameTextForPlayer(playerid,string,6500,6);
GetPlayerName(playerid,pName,64);
format(string,sizeof(string),"Radio: %s is taking off from LVA",pName);
SendClientMessageToAll(COLOR_RADIO,string);
}
else {
format(string,sizeof(string),"~w~Las Venturas Airport: ~r~Negative, runway in-use");
GameTextForPlayer(playerid,string,6500,6);
}
//sfa
} else if (IsPlayerInRangeOfPoint(playerid,700,-1294.7537,62.1835,14.1484) == 1)
{
if (sfa == 0) {
sfa = 1;
SetTimerEx("timer_reset",20000,false,"i",2);
format(string,sizeof(string),"~w~San Fierro Airport: ~g~You are allowed to takeoff.");
GameTextForPlayer(playerid,string,6500,6);
GetPlayerName(playerid,pName,64);
format(string,sizeof(string),"Radio: %s is taking off from SFA",pName);
SendClientMessageToAll(COLOR_RADIO,string);
}
else {
format(string,sizeof(string),"~w~San Fierro Airport: ~r~Negative, runway in-use");
GameTextForPlayer(playerid,string,6500,6);
}
//a69
} else if (IsPlayerInRangeOfPoint(playerid,500,312.1916,2011.1819,17.6406) == 1)
{
if (a69 == 0) {
a69 = 1;
SetTimerEx("timer_reset",20000,false,"i",4);
format(string,sizeof(string),"~w~Area 69: ~g~You are allowed to takeoff.");
GameTextForPlayer(playerid,string,6500,6);
GetPlayerName(playerid,pName,64);
format(string,sizeof(string),"Radio: %s is taking off from A69",pName);
SendClientMessageToAll(COLOR_RADIO,string);
}
else {
format(string,sizeof(string),"~w~Area 69: ~r~Negative, runway in-use");
GameTextForPlayer(playerid,string,6500,6);
}
}
}
}
}
}
I hope that i have helped
![afro](images/smilies/mrgreen.gif)