What i do wrong ??
#1

SLOVED!!! Thanks to all.
Reply
#2

Which line is 647?
Reply
#3

EDIT: wrong its this
Код:
else if(vehicleid == BallasCar[i])
Reply
#4

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    for(new i = 0; i < 12; i++)
    {
    	if(vehicleid == GroveCar[i])
        {
            if(PlayerInfo[playerid][pGrove] < 1)
            {
                ClearAnimations(playerid);
                SendClientMessage(playerid, COLOR_GREEN, "[Grove] You need to be in the Grove Gang to drive Grove Cars!");
        }
	}
 	else if(vehicleid == BallasCar[i])
        {
            if(PlayerInfo[playerid][pBallas] < 1)
            {
                ClearAnimations(playerid);
                SendClientMessage(playerid, COLOR_PINK, "[Ballas] You need to be in the Ballas Gang to drive Ballas Cars!");
            }
            }
           }
            return 1;
        }
Try that
Reply
#5

Here:

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    for (new i = 0; i < 12; i ++) if (vehicleid == GroveCar[i])
    {
        if (PlayerInfo[playerid][pGrove] < 1)
        {
            ClearAnimations(playerid);
            SendClientMessage(playerid, COLOR_GREEN, "[Grove] You need to be in the Grove Gang to drive Grove Cars!");
            break;
        }
    }
    for (new i = 0; i < 12; i ++) if (vehicleid == BallasCar[i])
    {
        if (PlayerInfo[playerid][pBallas] < 1)
        {
            ClearAnimations(playerid);
            SendClientMessage(playerid, COLOR_PINK, "[Ballas] You need to be in the Ballas Gang to drive Ballas Cars!");
            break;
        }
    }
    return 1;

}
It's vital to have proper indentation as it makes more readable code.
Reply
#6

Thanks to all I Fixed it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)