30.04.2012, 17:01
OK, I have been scripting and fixing this thing for 2 hours+ but it ain't working yet. So here's the script...
Any solutions for this? :S
pawn Код:
new USAHunter, USASparrow, USARhino1, USARhino2, USAHydra1, USAHydra2;
public OnGameModeInIt()
{
USAHunter = AddStaticVehicleEx(425,-165.60000610,2654.19995117,66.00000000,90.00000000,-1,-1,15); //Hunter
USARhino1 = AddStaticVehicleEx(432,-171.00000000,2695.10009766,63.20000076,90.00000000,-1,-1,15); //Rhino
USARhino2 = AddStaticVehicleEx(432,-171.10000610,2681.10009766,63.20000076,90.00000000,-1,-1,15); //Rhino
USASparrow = AddStaticVehicleEx(447,-165.30000305,2668.50000000,65.09999847,90.00000000,-1,-1,15); //Seasparrow
USAHydra1 = AddStaticVehicleEx(520,-302.00000000,2628.39990234,63.70000076,270.00000000,-1,-1,15); //Hydra
USAHydra2 = AddStaticVehicleEx(520,-301.89999390,2638.39990234,63.70000076,270.00000000,-1,-1,15); //Hydra
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new vID = GetVehicleModel(GetPlayerVehicleID(playerid));
if(vID == USAHunter && vID == USAHydra1 && vID == USAHydra2)
{
if(GetPlayerKills(playerid) < 750)
{
SendClientMessage(playerid,COLOR_ERROR,"You need to be Command Master Sergeant to fly Hunter/Hydra.");
SendClientMessage(playerid,COLOR_WHITE,"Check /ranks for more info.");
RemovePlayerFromVehicle(playerid);
return 1;
}
else if(GetPlayerKills(playerid) >= 750)
{
SendClientMessage(playerid,COLOR_ROYALBLUE,"Good luck in killing your enemies!");
return 1;
}
else if(vID == USARhino1 && vID == USARhino2 && vID == USASparrow)
{
if(GetPlayerKills(playerid) < 250)
{
SendClientMessage(playerid,COLOR_ERROR,"You need to be Corporal to drive Rhino (tank)/fly Sea Sparrow.");
SendClientMessage(playerid,COLOR_WHITE,"Check /ranks for more info.");
RemovePlayerFromVehicle(playerid);
return 1;
}
else if(GetPlayerKills(playerid) >= 250)
{
SendClientMessage(playerid,COLOR_ROYALBLUE,"Good luck in killing your enemies!");
return 1;
}
}
return 1;
}
return 1;
}