20.02.2011, 11:50
There is zombie team and human team in my server.
I want that only humans can drive with cars.
zombies cant drive with cars.
some cars are broken and even humans cant drive.
Only thing is working that humans can go into police car[id 596], but zombies cant.
i got 0 problems, 0 errors when i compile, but it wont still work
I want that only humans can drive with cars.
zombies cant drive with cars.
some cars are broken and even humans cant drive.
Only thing is working that humans can go into police car[id 596], but zombies cant.
i got 0 problems, 0 errors when i compile, but it wont still work
Код:
#define TEAM_HUMAN 0 #define TEAM_ZOMBIE 1
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { new vehicleid = GetPlayerVehicleID(playerid); if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(vehicleid) == 596 || (vehicleid) == 416) { if(PlayerTeam[playerid] == 0) { SendClientMessage(playerid, COLOR_GREEN, "This is one of the last working cars, you can use this vehicle to avoid the zombies."); } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "Brains....No brains heeere...."); } if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(vehicleid) == 523 || (vehicleid) == 601) { if(PlayerTeam[playerid] == 0) { SendClientMessage(playerid, COLOR_RED, "Out of fuel or engine is broken, better find another car.."); RemovePlayerFromVehicle(playerid); } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "Brains....No brains heeere...."); } } } }