Help !! Adding Checkpoint Missions (Rep +++)
#1

Guys im making a server in which i put plane missions from 1 airport to another so can anyone tell me how can i make checkpoint from 1 airport to other ? Please help me !!!! i give u Big REP +111111
Please tell me.
Thanks
Avi.
Reply
#2

pawn Код:
#include <a_samp>

new Airports[][][] {
        { "No-Where", "0.0", "0.0", "0.0" }
    };
   
new PlayerOnMission[Max_Players];

public OnPlayerConnect(playerid) {
    PlayerOnMission[playerid] = 0;
    return true;
}

public OnPlayerDisconnect(playerid, reason) {
    PlayerOnMission[playerid] = 0;
    return true;
}
   
public OnPlayerEnterVehicle(playerid, vehicleid) {
    switch(GetVehicleModel(vehicleid)) {
        case 460, 476, 511 .. 513, 519, 520, 553, 577, 592, 593: {
            new Message[100],
                RandomAirport = rand(sizeof(Airports));
            format(Message, 100, "A checkpoint has been set at %s!", Airports[RandomAirport][0]);
            SendClientMessage(playerid, -1, Message);
            SetPlayerCheckpoint(playerid, floatstr(Airports[RandomAirport][1]), floatstr(Airports[RandomAirport][2]), floatstr(Airports[RandomAirport][3]));
            PlayerOnMission[playerid] = 1;
        }
    }
    return true;
}

public OnPlayerEnterCheckpoint(playerid) {
    if(PlayerOnMission[playerid] == 1) {
        SendClientMessage(playerid, -1, "You have arrived at an airport!");
        GivePlayerMoney(playerid, 500);
    }
    return true;
}
How to Add Airports:
1. Go to Airports[][][]
2. Add...
Код:
,
		{ "AirportName", "X", "Y", "Z" }
... after the very last Airport.

Hope you learned a thing or two.
If you require more help you can PM me or add my Skype: TheLazySloth
Thanks for Reading.
Reply
#3

Quote:

{ "AirportName", "X", "Y", "Z" }

How to get "X", "Y", "Z" . Please tell me and how i can put checkpoints ?
Reply
#4

In-game, type "/save" then go to your San Andreas folder located most likely in Program Files and go to Data > SAMP > savedpositions.txt there should be your saved coords.
Reply
#5

i get this:
AddPlayerClass(0,1984.6284,-2465.3918,13.5469,86.5316,0,0,0,0,0,0); //

now how can i put it ?
Reply
#6

"AirportName", "1984.6284", "-2465.3918", "13.5469"

AddPlayerClass(SkinID, X, Y, Z, A, W1, A1, W2, A2, W3, A3);

From AddPlayerClass all you need is the X Y and Z.
Reply
#7

hey if i need to add it as Filterscript then how i need to put
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)