C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(1908) : warning 217: loose indentation C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(13386) : warning 235: public function lacks forward declaration (symbol "timer_reset") C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(13397) : warning 235: public function lacks forward declaration (symbol "timer_transmitted") C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(13411) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(13428) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(13445) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(13462) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(13491) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(13508) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(13525) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(13542) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(498) : warning 204: symbol is assigned a value that is never used: "GodTimer" C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(497) : warning 204: symbol is assigned a value that is never used: "PingTimer" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 13 Warnings.
public timer_reset(airfield)
{
switch(airfield) {
case 0: lsa = 0;
case 1: lva = 0;
case 2: sfa = 0;
case 3: a69 = 0;
}
}
public timer_transmitted(land,playerid)
{
if (land == 1) {
switch(GetVehicleModel(GetPlayerVehicleID(playerid))) {
case 520 , 577 , 511 , 592 , 512 , 513 , 519 , 593 , 553 , 476:
{
new string[64];
//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);
new pName[64];
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);
new pName[64];
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);
new pName[64];
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);
new pName[64];
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:
{
new string[64];
//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);
new pName[64];
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);
new pName[64];
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);
new pName[64];
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);
new pName[64];
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);
}
}
}
}
}
}
stock ReturnPlayerName(playerid) //By Alex "******" Cole
{
new pName[MAX_PLAYER_NAME];
pName="Invalid PlayerID";
if(IsPlayerConnected(playerid)) {
GetPlayerName(playerid, pName, sizeof (pName));
}
return pName;
}
For now use
pawn Код:
|
Outside, quite literally.
Add it to the end of your script or somewhere. Where your other custom functions & stocks are. Just make sure it's not inside another stock, function or callback. |
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);
}
}
}
}
}
}