if(IsPlayerInRangeOfPoint little help
#1

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
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;
        }
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

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.
Reply
#2

try this, maybe can work for you,
i remove the commas
Код:
//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);
    }
Reply
#3

No it wont work you need the command to do that mission
If you know anything from checkpoints :P you need to be near to area 51 or in area 51 to do a military mission if you're in an military plane and if you have the required score.


Note: i've made the score thingys and plane things my self.
Reply
#4

weird because it works on my server :P
Reply
#5

Quote:
Originally Posted by diego_p11
Посмотреть сообщение
weird because it works on my server :P
Then you no shit from checkpoints :P

if the player is near to A51 or to A51 he gets a checkpoint on the A51 to fly from there to SF Carrier
HOW the hell will he go from a51 to sf carrier if he doesnt have the a51 checkpoint ?


This forum requires that you wait 120 seconds between posts. Please try again in 0 seconds.
WHAT THE HELL?
Reply
#6

-Bump-
12 Hours passed.
Reply
#7

Nvm solved after 2 days it got posted
REMOVE THIS USELESS TOPIC
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)