Firstly I'll explain my problem, I have Hunter Helicopters on my server and I don't want other team players to use them. So far I also have a lock for Score. As it will detect the player's score and only if their score is more than 2000, the "Army" team player is allowed to use the vehicle, but if that individual team player's score is less than 2k, then they are not allowed to enter. What I would want to implement here is, I want the player to have more than 2k score but also at the same time, must* be in the Team of Army. My team "Army" ID is 9
Here is the code I have at the moment under OnPlayerEnterVehicle
Can anyone provide me the code to do so? +REP. Also can someone show me a simple command using the GetPlayerTeam?
Here is the code I have at the moment under OnPlayerEnterVehicle
Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(vehicleid) == 425)
{
if(GetPlayerScore(playerid) < 2000)
{
SetVehicleParamsForPlayer(vehicleid, playerid, false, true);
SendClientMessage(playerid, 0xFF0000FF, "You must be in team army and must have the score 2000 to drive a Hunter!");
}
}