SA-MP Forums Archive
Need Help with Making a Recon Plane - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need Help with Making a Recon Plane (/showthread.php?tid=249030)



Need Help with Making a Recon Plane - JonnyDeadly - 16.04.2011

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?


Re: Need Help with Making a Recon Plane - JonnyDeadly - 17.04.2011

Can anybody help?


Re: Need Help with Making a Recon Plane - aircombat - 17.04.2011

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


Re: Need Help with Making a Recon Plane - Kwarde - 17.04.2011

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