28.06.2012, 17:32
hey,
I'm trying to get this working:
If I set a car to group 1, and i enter it while im group 0 it has to say: This car is only usable by "Name from group".
But it doesn't show the name of the group.
Anyone help?
I'm trying to get this working:
If I set a car to group 1, and i enter it while im group 0 it has to say: This car is only usable by "Name from group".
But it doesn't show the name of the group.
pawn Код:
new string[128];
new PlayerVehicle = GetVehicleFileID(GetPlayerVehicleID(playerid));
if(Vehicles[PlayerVehicle][CarGroup] != 0 && Vehicles[PlayerVehicle][CarGroup] != Player[playerid][Group])
{
format(string, sizeof(string), "This vehicle is only usable by %s.", Groups[Vehicles[PlayerVehicle][CarGroup]][GroupName]);
SendClientMessage(playerid, WHITE, string);
RemovePlayerFromVehicle(playerid);
}