SA-MP Forums Archive
Doesn't show the name of the group - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Doesn't show the name of the group (/showthread.php?tid=355023)



Doesn't show the name of the group - Stefand - 28.06.2012

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.

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);
        }
Anyone help?