Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×
  • 0

Ajutor comanda /bonus


Question

Posted

Salutare, mi-am facut propria comanda de [ /bonus ] , dar imi da eroare... Va rog frumos sa ma ajutati..

 

CMD:bonus(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
	if(IsPlayerConnected(playerid))
 	{
 	    if(BonusActiv > 0)
 	    {
 	    	if(PlayerInfo[playerid][pLevel] <= 2)
 	    	{
 	        	GivePlayerCash(playerid, 30000000);
 	        	PlayerInfo[playerid][pLevel] = 3;
 	        	PlayerInfo[playerid][pPremiumPoints] = 100;
 	        	Update(playerid, pLevelx);
 	        	Update(playerid, pCashx);
 	        	Update(playerid, pPremiumPointsx);
 	        	SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
 	        	SendClientMessage(playerid, COLOR_WHITE, "--------------------------[RPG.AFUMATII.RO]---------------------------------");
 	        	SendClientMessage(playerid, COLOR_RED, "Ai primit $30,000,000, te poti duce la un job si poti sa-ti cumperi o masina!");
 	        	SendClientMessage(playerid, COLOR_BLUE, "Ai primit level 3, de la level 5 poti intra intr-o factiune!");
 	        	SendClientMessage(playerid, COLOR_YELLOW, "Ai primit 100 puncte premium pe care le poti folosi in [/shop]!");
 	        	SendClientMessage(playerid, COLOR_WHITE, "--------------------------[RPG.AFUMATII.RO]---------------------------------");
			}
			else return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu poti folosi aceasta comanda daca ai level 3+ !");
		}
	}
	return 1;
}
CMD:activatebonus(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
	if(IsPlayerConnected(playerid))
 	{
 	    if (PlayerInfo[playerid][pAdmin] >= 6)
		{
		    if(BonusActiv == 0)
 	    	{
 	    	    BonusActiv = 1;
 	    	    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai activat comanda /bonus!");
			}
			else
			{
			    BonusActiv = 0;
			    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai dezactivat comanda /bonus!");
			}
		}
		else
		{
			SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
		}
	}
	return 1;
}

Imi da eroarea asta: https://imgur.com/a/MvBsggM

Va rog frumos, +1 la cine ma ajuta!!!

12 answers to this question

Recommended Posts

  • 1
Posted
Just now, Valentin. said:

Am sters liniile alea 2 si acum imi da mai multe erori..

C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36135) : error 017: undefined symbol "BonusActiv"
C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36148) : error 017: undefined symbol "COLOR_BLUE"
C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36163) : error 017: undefined symbol "BonusActiv"
C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36165) : error 017: undefined symbol "BonusActiv"
C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36165) : warning 215: expression has no effect
C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36170) : error 017: undefined symbol "BonusActiv"
C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36170) : warning 215: expression has no effect
C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36176) : error 017: undefined symbol "AdminOnly"
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
 

Adauga la inceput de gm

new BonusActiv = 0;

#define COLOR_BLUE          0x211CDEC8

 

iar comanda uite https://pastebin.com/SmUuV6Wk

  • Thanks 1
  • 1
Posted
1 minute ago, Valentin. said:

Tot imi mai da eroarea asta..:

C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36179) : error 017: undefined symbol "AdminOnly"
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
 

da-mi linia 36179

  • 0
Posted
Acum 10 minute, Csf a spus:

Pune linile din eroare.

Uita-te in poza, eroarea e faptul ca nu are variabila gPPlayerLogged definita(primele lini din comanda)

  • 0
Posted
Acum 30 minute, Banditul a spus:

Uita-te in poza, eroarea e faptul ca nu are variabila gPPlayerLogged definita(primele lini din comanda)

Te rog sa ma ajuti, rescrie-mi-o si mie linia unde e eroarea.. Raman recunoscator!!!

  • 0
Posted
Acum 36 minute, AlexxAdv a spus:

Sterge linia aia cu if(gplayerlogged

Am sters liniile alea 2 si acum imi da mai multe erori..

C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36135) : error 017: undefined symbol "BonusActiv"
C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36148) : error 017: undefined symbol "COLOR_BLUE"
C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36163) : error 017: undefined symbol "BonusActiv"
C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36165) : error 017: undefined symbol "BonusActiv"
C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36165) : warning 215: expression has no effect
C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36170) : error 017: undefined symbol "BonusActiv"
C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36170) : warning 215: expression has no effect
C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36176) : error 017: undefined symbol "AdminOnly"
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
 

  • 0
Posted
Acum 4 minute, AlexxAdv a spus:

Adauga la inceput de gm

new BonusActiv = 0;

#define COLOR_BLUE          0x211CDEC8

 

iar comanda uite https://pastebin.com/SmUuV6Wk

Tot imi mai da eroarea asta..:

C:\Users\Valentin\Desktop\Blue-King RPG\gamemodes\rpg.pwn(36179) : error 017: undefined symbol "AdminOnly"
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.