25.06.2013, 09:55
Alright I tried that and that's the outpout;
Without being in the Team_GOV;
12 being my Team_Civ (The default team when you spawn)
Now, I tried again being a Team_Gov member;
It kicks me out of the vehicle BUT doesn't show the "You are not authorised to use that vehicle." message.
The console doesn't show nothing (the printf doesn't show up)
I forgot a part of the "code" later, here's the full code for one team
That's added in "OnPlayerStateChange"
Without being in the Team_GOV;
Код:
[05:54:44] DEBUG: gteam[0] = 12, Team_GOV = 17
Now, I tried again being a Team_Gov member;
It kicks me out of the vehicle BUT doesn't show the "You are not authorised to use that vehicle." message.
The console doesn't show nothing (the printf doesn't show up)
I forgot a part of the "code" later, here's the full code for one team
That's added in "OnPlayerStateChange"
Код:
if(newstate==PLAYER_STATE_DRIVER) { new vehicleid = GetPlayerVehicleID(playerid); if(vehicleid == 103 || 104 || 105 || 106 || 107 || 108 || 109) // GOVERNMENT VEHICLES { if(gteam[playerid] != Team_GOV) { printf("DEBUG: gteam[%d] = %d, Team_GOV = %d", playerid, gteam[playerid], Team_GOV); SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You are not authorised to use that vehicle."); RemovePlayerFromVehicle(playerid); } } }