Player weapon stock problem :/
#1

I want to create some stock to give ammo, and remove it, I made this, Its works... but sometimes doesnt work

Stock

Thanks

EDIT: I have an other problem, I don't know if is a samp bug or what...
I have this lock command:
pawn Код:
CMD:seguro(playerid, params[])
{
    new Float:pos[3];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    new engine, lights, alarm, doors, bonnet, boot, objective;
    new range = 5, Float:Distance, Float:PretendentDistance = range +1;
    for(new i = 1; i < MAX_VEHICLES; i ++)
    {
        Distance = GetVehicleDistanceFromPoint(i, pos[0], pos[1], pos[2]);
        if(Distance <= range && Distance <= PretendentDistance)
        {
            if(strcmp(cInformacion[i][cOwner], NombreJ(playerid)) == 0)
            {
                new string[128];
                GetVehicleParamsEx(i, engine, lights, alarm, doors, bonnet, boot, objective);
                if(doors == 0)
                {
                    cInformacion[i][cLocked] = 1;
                    SetVehicleParamsEx(i, engine, lights, alarm, 1, bonnet, boot, objective);
                    format(string, sizeof(string), "** %s cerrу su vehiculo", NombreIC(playerid));
                    ProxDetector(20, playerid, string, 0xCC2EFAFF, 0xCC2EFAFF, 0xCC2EFAFF, 0xCC2EFAFF, 0xCC2EFAFF);
                    return 1;
                }
                else
                {
                    cInformacion[i][cLocked] = 0;
                    SetVehicleParamsEx(i, engine, lights, alarm, 0, bonnet, boot, objective);
                    format(string, sizeof(string), "** %s abriу su vehiculo", NombreIC(playerid));
                    ProxDetector(20, playerid, string, 0xCC2EFAFF, 0xCC2EFAFF, 0xCC2EFAFF, 0xCC2EFAFF, 0xCC2EFAFF);
                    return 1;
                }
            }
            else return SendClientMessage(playerid, -1, "No estas cerca de ningun vehiculo tuyo");
        }
    }
    return 1;
}
And return "No estas cerca de ningun vehiculo tuyo", and the vehicleid used is the first unused vehicleid (2, 1 is the test car), it's normal?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)