09.11.2013, 20:54
Ok so, i have a custom vehicle and i want to disable the use for TEAM_BLUE, so i did in this way:
I have 2 teams: BLUE and GREEN. ONLY green should be allowed to take the Sultan, but doesn't work. Blue are allowed, how to fix it?
pawn Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new vehicleidk;
vehicleidk = GetPlayerVehicleID(playerid);
if(vehicleidk == Sultan)
{
if(gTeam[playerid] == TEAM_BLUE)
{
SendClientMessage(playerid,0xAA3333AA,"** Team blue can't steal the Sultan. Protect it!");
RemovePlayerFromVehicle(playerid);
return 0;
}
}
return 1;
}