Jump to content

Question

Posted

Salutare! As vrea sa va intreb daca puteti sa ma ajutati cu urmatoarea problema. Deci eu vreau sa ma apuc de scriptat gm samp (Am mai scriptat dar nu profesionist) si am un GM in care trebuie sa folosesc comanda text "/engine" ca sa porneasca motorul. Intrebarea este cum pun comanda pe un buton de exemplu pe 2? Daca ma puteti ajuta si pe mine..

3 answers to this question

Recommended Posts

Posted

Deci uite cum faci te duci unde vrei in gamemode si adaugi:

EDIT: Gresisem ceva am scris OnPlayerStateChange in loc de OnPlayerKeyStateChange. Scuze :)

[pawn]public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

{       

      if(newkeys == KEY_SUBMISSION)

      {

            // Aici pui comanda /engine

      }

}[/pawn]

KEY_SUBMISSION = Tasta 2

Uite aici ai un link cu toate key-urile: http://wiki.sa-mp.com/wiki/Keys ... unele trebuie definite

Ca sa le definesti uite un exemplu pui sus in gamemode: #define KEY_YES (65536)

KEY_YES = Key-ul

65536 = Value-ul Keyului de pe http://wiki.sa-mp.com/wiki/Keys

Posted

Eu cand am inceput sa scriptez am pus comanda la OnPlayerCommandText parca dar stiu sigur ca nu acolo unde ai spus tu si era in loc de "cmd" era altfel pentru BUTON KEYE ..

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.