SA-MP Forums Archive
Command to view all vehicles owned by a person doesn't work - 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: Command to view all vehicles owned by a person doesn't work (/showthread.php?tid=608626)



Command to view all vehicles owned by a person doesn't work - justjamie - 03.06.2016

title.
PHP код:
COMMAND:myvehicles(playerid)
{
    new
        
iBigStr[ 386 ];
    
SendClientMessage(playerid, -1, "{3696EB}________________________________________________________________________");
    for(new 
i = 1; i < sizeof(cInfo); i++)
    {
        if(!
strcmp(cInfo[i][carowner], PlayerName(playerid), false))
        {
            new 
zone[ 80 ], Float:vipos[3], lockstr[10];
            if(
cInfo[i][tmplocked]) myStrcpy(lockstr, "Yes");
            else 
myStrcpy(lockstr, "No");
            
GetVehiclePos(i, vipos[0], vipos[1], vipos[2]);
            
GetZone(vipos[0], vipos[1], vipos[2], zone);
            
format(iBigStr, sizeof(iBigStr), "{bebaba}(ID %d) {51983e}%s [Location: {bebaba}%s{51983e}] [Locked: {bebaba}%s{51983e}]", i, GetVehicleName(i), zone, lockstr);
            if(
strcmp(Vehicles[i][dupekey], "NoBodY", true))
            {
                new 
tmp[ 64 ];
                
format(tmp, sizeof(tmp), "[Dupe-Key: %s]", Vehicles[i][dupekey]);
                
strcat(iBigStr, tmp);
            }
            if(
dini_Int(CarFile(i), "impounded") == 1) strcat(iBigStr, " [IMPOUNDED]");
            
SendClientMessage(playerid, -1, iBigStr);
        }
    }
return 
1;
} 
what's wrong here?