Jump to content

Cerere tutorial comanda


BoBBiTa

Recommended Posts

Descriere tutorial: Salut sa-mp.ro, am facut o comanda sa repari masina /vehfix, priviti :

 

CMD:fixveh(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Nu esti intr-o masina!");
RepairVehicle(GetPlayerVehicleID(playerid)); return SendClientMessage(playerid, COLOR_LIME, "Ti-ai reparat masina!");
return 1;
}

 

As vrea sa o modific, de exemplu sa apas 2 si sa se repare masina fara sa mai scriu comanda, am cautat pe google dar nu am gasit mai nimic si am venit sa va cer ajutorul.

// Desenul meu animat 
// Alte episoade aici: 
https://www.youtube.com/channel/UCF2kY1CzhHI_PCyV5LprQ1w/videos

 

 

 

Link to comment
Share on other sites

La OnPlayerKeyStateChange pune:

if (newkeys==KEY_ANALOG_DOWN)
    {
         if(IsPlayerConnected(playerid))
         {
         if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Nu esti intr-o masina!");
         RepairVehicle(GetPlayerVehicleID(playerid)); return SendClientMessage(playerid, COLOR_LIME, "Ti-ai reparat masina!");
return 1;
}

Vezi daca merge cu 2 de sus de langa litere,daca nu merge cu ala atunci merge cu 2 de langa sagetile UP DOWN LEFT RIGHT.

Daca vrei sa modific Key-ul (sa schimbi pe alta tasta) iti sugerez : http://wiki.sa-mp.com/wiki/Keys

 

 

Link to comment
Share on other sites

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.