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
        
iBigStr386 ];
    
SendClientMessage(playerid, -1"{3696EB}________________________________________________________________________");
    for(new 
1sizeof(cInfo); i++)
    {
        if(!
strcmp(cInfo[i][carowner], PlayerName(playerid), false))
        {
            new 
zone80 ], Float:vipos[3], lockstr[10];
            if(
cInfo[i][tmplocked]) myStrcpy(lockstr"Yes");
            else 
myStrcpy(lockstr"No");
            
GetVehiclePos(ivipos[0], vipos[1], vipos[2]);
            
GetZone(vipos[0], vipos[1], vipos[2], zone);
            
format(iBigStrsizeof(iBigStr), "{bebaba}(ID %d) {51983e}%s [Location: {bebaba}%s{51983e}] [Locked: {bebaba}%s{51983e}]"iGetVehicleName(i), zonelockstr);
            if(
strcmp(Vehicles[i][dupekey], "NoBodY"true))
            {
                new 
tmp64 ];
                
format(tmpsizeof(tmp), "[Dupe-Key: %s]"Vehicles[i][dupekey]);
                
strcat(iBigStrtmp);
            }
            if(
dini_Int(CarFile(i), "impounded") == 1strcat(iBigStr" [IMPOUNDED]");
            
SendClientMessage(playerid, -1iBigStr);
        }
    }
return 
1;

what's wrong here?