SA-MP Forums Archive
close cmd - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: close cmd (/showthread.php?tid=272769)



close cmd - Unknown123 - 29.07.2011

pawn Код:
CMD:close(playerid,params[])
{
    for(new v=0; v<MAX_VEHICLES;v++)
    {
        new Float:z, Float:y, Float:z;
        GetVehiclePos(v, x, y, z);
        if(strmatch(Vehicleinfo[v][Carowner], GetPlayerNameEx(playerid)))
        {
            if(!IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z))
            {
                SendClientMessage(playerid, -1, "no of your bought cars is close to you!");
                return 1;
            }
            else
            {
                //close
            }
        }
    }
    return 1;
}
this command only work if i got 1 vehicle, it gets bugged if i got 2+ cars why?