Jump to content

Recommended Posts

Posted (edited)

Poate sa puna cineva chestia asta intr-un Fs sau sa creeze un Fs cu asa ceva  e pentru Lock car  cand apasati tasta N ???

 

 


    if(newkeys & KEY_NO)
    {
        LockCarFunction(playerid);
    }


stock LockCarFunction(playerid) {
    new string[128];
    new idd, car;
    car = GetClosestVehicle(playerid);
    idd = FindSpawnID(car);
    if(idd == 0 || CarInfo[idd][Userid] != PlayerInfo[playerid][pSQLID] || !IsPlayerNearVehicle(playerid,car,3)) 
    {
        SendClientMessage(playerid, COLOR_WHITE, "{999999}Nu sunt vehicule in jur care pot fi descuiate/incuiate.");
        return 1;
    }
    if(CarInfo[idd][vLock] == 0)
    {
        CarInfo[idd][vLock] = 1;
        GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
        SetVehicleParamsEx(car,engine,lights,alarm,1,bonnet,boot,objective);
        format(string,sizeof(string),"~w~%s ~r~Locked",VehicleNames[CarInfo[idd][vModel]-400]);
        GameTextForPlayer(playerid, string, 5000, 4);
        mysql_format(handle, string, sizeof(string), "UPDATE vehicles SET Locked='%d' WHERE ID=%d", CarInfo[idd][vLock], idd);
        mysql_tquery(handle, string, "", "");
    }
    else
    {
        CarInfo[idd][vLock] = 0;
        GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
        SetVehicleParamsEx(car,engine,lights,alarm,0,bonnet,boot,objective);           
        format(string,sizeof(string),"~w~%s ~g~Unlocked",VehicleNames[CarInfo[idd][vModel]-400]);
        GameTextForPlayer(playerid, string, 5000, 4);
        mysql_format(handle, string, sizeof(string), "UPDATE vehicles SET Locked='%d' WHERE ID=%d", CarInfo[idd][vLock], idd);
        mysql_tquery(handle, string, "", "");
    }
    return 1;
}


CMD:lock(playerid, params[])
{
    LockCarFunction(playerid);
    return 1;
}

Edited by Pitbul97
Posted

Nu se cer scripturi, pe langa asta tu nu intelegi cum merg lucrurile in scripting, tu in gm ai un sistem de masini cu variabilele sale, daca adaugi un fs la server pentru masinile serverului pe langa faptul ca nu va functiona poate va produce si buguri sau erori la compilare, daca e luata o comanda de pe net pur sisimplu

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Posted
On 7/21/2016 at 16:27, Pitbul97 said:

asta inseamna ca trebuie sa las asa si nu pot modifica sa inteleg

Lasa-l in gm, daca il scoti intr-un fs nu o sa ai atatea facilitati ...

242086.png

Posted

Topic Inactiv. T/C

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.