loop for vehicle who owner = me ?!
#1

So , i'm having this problem


I want to don't have problems with ids , so i made to check the player name if is vOwner = me , to work.\\

for example the VehicleInfo[1][vOwner] was me but it wasn't loaded , why ? i did something wrong?

The problem is that he's not hecking right ...
pawn Код:
if(strcmp(cmd, "/vehicles", true) == 0)
    {
        new index = 0;
        new coordsstring[1056];
        for(new i = 0; i < sizeof(VehicleInfo); i++)
        {
             if(!strcmp(GetName(playerid), VehicleInfo[i][vOwner]))
             {
                new vid;
                vid  =  i
                new location[MAX_ZONE_NAME];
                new Float:x, Float:y, Float:z;
                GetVehiclePos(VehicleInfo[vid][vVeh], x,y,z);
                GetPosZone(x,y, location, MAX_ZONE_NAME);
                format(coordsstring, sizeof(coordsstring), "Vehicle #%d - %s | Parcurs [%s KM] | Plate [%s] | Fuel [%d%] | Tickets [%d] | GPS [%s] " ,index,VehicleInfo[vid][vModelName], FormatMoney(VehicleInfo[vid][vKM]),VehicleInfo[vid][vPlate], Gas[VehicleInfo[vid][vVeh]],VehicleInfo[vid][vTicket] ,location);
                SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
                index ++;
             }
        }
        if(index < 1)
        {
            SendClientMessage(playerid, COLOR_GRAD2, "  Nu ai nici un vehicul personal in posesie.");
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)