Jump to content

Question

Posted (edited)

Problema intalnita (descriere):problema functie OnPlayerKeyStateChange sistem vote-kick
Ero(area / rile) / warning-(ul / urile): linia 18300

  if(PRESSED(KEY_YES))
        {

LINIA 18311

 if(PRESSED(KEY_NO))
        {

Liniile de cod / sursa / script-ul(obligatoriu):

 ////////OnPlayerKeyStateChange/////
 ///////////////////////////////////
        if(Active == 1)
        {
        if(PRESSED(KEY_YES))
        {
        new string[128], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        SendClientMessage(playerid, CL, "You voted to kick that player {FF0000}[YES]");
        Active = 0;
        Close();
        YesPlayers++;
        format(string, sizeof(string), "{FF0000}%s {FFCC33}voted for.", name);
        SendClientMessageToAll(-1, string);
        }
        if(PRESSED(KEY_NO))
        {
        new string[128], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        SendClientMessage(playerid, CL, "You voted to don't kick that player {FF0000}[NO]");
        Active = 0;
        Close();
        NoPlayers++;
        format(string, sizeof(string), "{FF0000}%s {FFCC33}voted aganist.", name);
        SendClientMessageToAll(-1, string);
       }
  }


Imagini / Video (optional):........... -----
Ati incercat sa rezolvati singur?: da dar nam reusit :(

Edited by KingZone
EDITARE

6 answers to this question

Recommended Posts

  • 0
Posted (edited)
15 minutes ago, KingZone said:

Ero(area / rile) / warning-(ul / urile): linia 18300


  if(PRESSED(KEY_YES))
        {

LINIA 18311


 if(PRESSED(KEY_NO))
        {

 

Trebuia să specifici care este warning-ul/eroare, nu doar linia. Dar presupun că este eroarea că nu ai definită funcția PRESSED, așa că pune asta după include-uri: 

#define PRESSED(%0) \
	(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

Dacă nu aceasta este eroarea te rog posteaz-o să știm despre ce este vorba.

Edited by ImpulsE

Gh38gEQ.gif

  • 0
Posted

D:\Gamemode RPG\gamemodes\gmsamp.pwn(18300) : error 029: invalid expression, assumed zero
D:\Gamemode RPG\gamemodes\gmsamp.pwn(18311) : error 029: invalid expression, assumed zero

 

 acestea sunt erorile!

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.