29.12.2011, 21:25
I made an Area 51 Checkpoint and i need some help getting the isplayerinrangeofpoint
I got the isplayerinrage of point but its not working.
Heres the script of the thing
let me note you i've made my system into enums.(no need for you to do something for the enums)
Now let me show you the other code
Note: its from my Pilot Gamemode.
I got the isplayerinrage of point but its not working.
Heres the script of the thing
pawn Код:
//Military 1 (AREA 51 TO SF Carrier)
else if(IsPlayerInRangeOfPoint(playerid, 1000, 308.2155, 2053.5720, 18.3638) && IsPlayerInArmy(playerid))
{
WorkInfo[playerid][IsWorking] = 1;
WorkInfo[playerid][Military1] = 1;
SendClientMessage(playerid, COLOR_ORANGE, "Complete a military Flight from Area 51 to SF Carrier");
SetPlayerCheckpoint(playerid, 308.2155, 2053.5720, 18.3638, 15);
return 1;
}
Now let me show you the other code
pawn Код:
//Military 1 Final
else if(WorkInfo[playerid][IsWorking] == 1 && WorkInfo[playerid][Military1] == 1)
{
SetPlayerCheckpoint(playerid, 1316.2190,498.8571,18.9576, 15);
WorkInfo[playerid][Military1] = 0;
WorkInfo[playerid][Military1Final] = 1;
GameTextForPlayer(playerid, "~g~Passenger's have boarded!", 3000, 5);
}
else if(WorkInfo[playerid][IsWorking] == 1 && WorkInfo[playerid][Military1Final] == 1)
{
StopWork(playerid);
new imoney = RandomEx( 12000, 22000 );
new imoney2 = RandomEx(100, 1000);
GivePlayerScore(playerid, 1);
GivePlayerMoney( playerid, imoney );
GivePlayerMoney( playerid, -imoney2 );
format( pString, sizeof pString, "You have earned $%d.", imoney );
SendClientMessage(playerid, COLOR_WHITE, pString);
format( pString2, sizeof pString, "Airport Tax $%d.", imoney2 );
SendClientMessage(playerid, COLOR_WHITE, pString2);
GameTextForPlayer(playerid, "~g~Mission Completed!", 3000, 5);
new pName[MAX_PLAYER_NAME]; // Saying pName is the Players Name!
new string[128]; // Creating the string.
GetPlayerName(playerid,pName,MAX_PLAYER_NAME); // tells the pName to get the players name!
format(string, sizeof(string), "%s Has Completed A Military Flight from Area 51 to SF Carrier",pName); // This is what will send to everyone!
SendClientMessageToAll(COLOR_ORANGE, string);
}
Note: its from my Pilot Gamemode.