Need Help with Making a Recon Plane
#1

Right, so for my roleplay server i'd like a recon plane for a military faction, the recon plane being the Nevada plane (Vehicle ID: 553) and i've done this:

pawn Код:
forward IsPlayerInReconPlane(playerid);


public IsPlayerInReconPlane(playerid)
{
    new carid = GetPlayerVehicleID(playerid);
    new carmodel = GetVehicleModel(carid);
    if(carmodel == 553)
    {
        LimitPlayerMarkerRadius(3000.0);
        ShowPlayerMarkers(1);
        SendClientMessage(playerid, WHITE, "You are in a SAMC Recon Plane.");
    }
    else
    {
   
    }
    return 1;
}
And none of this is working at all, so what should i have done?
Reply
#2

Can anybody help?
Reply
#3

pawn Код:
stock IsPlayerInReconPlane(playerid)
{
    new carid = GetPlayerVehicleID(playerid);
    new carmodel = GetVehicleModel(carid);
    if(carmodel == 553)
    {
            LimitPlayerMarkerRadius(3000.0);
            ShowPlayerMarkers(1);
            SendClientMessage(playerid, WHITE, "You are in a SAMC Recon Plane.");
            return 1;
    }
    else return 0;
}
try that
Reply
#4

No need to forward+public that.
You can simply use stock. And you won't need to make two variables o_O. Here is it again, and a bit 'better' (not using variables is better. I'm too lazy to explain it now. Someone's made a tutorial. I think it was ****** but I can't remember right now)

pawn Код:
stock IsPlayerInReconPlane(playerid)
{
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 553)
    {
        LimitPlayerMarkerRadius(3000.0);
        ShowPlayerMarkers(true);
        SendClientMessage(playerid, WHITE, "You are in a SAMC Recon Plane.");
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)