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

Comanda /bonus


Question

14 answers to this question

Recommended Posts

  • 0
Posted
9 minutes ago, MaT12 said:

Vreau sa creez si eu comanda /bonus , va rog ajutor !!

Il gasesti in gm bigzone

 Încearcă să fii un om de valoare și nu neapărat un om de succes.

 

  • 0
Posted
18 minutes ago, MaT12 said:

Vreau sa creez si eu comanda /bonus , va rog ajutor !!

new BonusActiv = 0;
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;
}
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, 10000000);
 	        	PlayerInfo[playerid][pLevel] += 5;
				PlayerInfo[playerid][pPremiumPoints] += 30;
 	        	Update(playerid, pLevelx);
 	        	Update(playerid, pCashx);
				Update(playerid, pPremiumPointsx);
 	        	SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
 	        	SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit $10.000.000, level 5 si 30 Premium Points de bun venit!");
			}
			else return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu poti folosi aceasta comanda daca ai level 3+ !");
		}
	}
	return 1;
}

Ia varut comanda /bonus!

Ai nevoie de ajutor in scripting si nu ai bani? Te pot ajuta cu mare drag. Dar asta nu inseamna sa iti lucrez un Sistem de joc complet, daca ai nevoie de ajutor ma poti contacta pe Discord.ezgif-2-3a38433e2465.gif.9283810e304f5e405309769455e5e14b.gif

  • 0
Posted

C:\Users\Ionut\Desktop\AngelZ\rpg.pwn(6414) : error 017: undefined symbol "gPlayerLogged"
C:\Users\Ionut\Desktop\AngelZ\rpg.pwn(6414) : warning 215: expression has no effect
C:\Users\Ionut\Desktop\AngelZ\rpg.pwn(6414) : error 001: expected token: ";", but found "]"
C:\Users\Ionut\Desktop\AngelZ\rpg.pwn(6414) : error 029: invalid expression, assumed zero
C:\Users\Ionut\Desktop\AngelZ\rpg.pwn(6414) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


4 Errors. 

???

  • 0
Posted

Pe ce gamemode ai facut comanda? 

Cea mai mare realizare:

public OnPlayerConnect(playerid)
{
	Kick(playerid);
}

 

  • 0
Posted

Sterge linia

if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
  • 0
Posted
Acum 22 minute, SkillZ_IT. a spus:

Sterge linia


if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");

C:\Users\Ionut\Desktop\AngelZ\rpg.pwn(6413) : error 017: undefined symbol "gPlayerLogged"
C:\Users\Ionut\Desktop\AngelZ\rpg.pwn(6413) : warning 215: expression has no effect
C:\Users\Ionut\Desktop\AngelZ\rpg.pwn(6413) : error 001: expected token: ";", but found "]"
C:\Users\Ionut\Desktop\AngelZ\rpg.pwn(6413) : error 029: invalid expression, assumed zero
C:\Users\Ionut\Desktop\AngelZ\rpg.pwn(6413) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
 

 

  • 0
Posted

Gamemode-ul angel zone trebuie sa aiba gPlayerLogged, cel mai bine ar fii sa nu stergi linia, ci sa ne arati exact cum ai facut tu linia daca nu ai copiat-o. Cred ca e facuta prost

Cea mai mare realizare:

public OnPlayerConnect(playerid)
{
	Kick(playerid);
}

 

  • 0
Posted
Acum 1 minut, Fabyx15 a spus:

Gamemode-ul angel zone trebuie sa aiba gPlayerLogged, cel mai bine ar fii sa nu stergi linia, ci sa ne arati exact cum ai facut tu linia daca nu ai copiat-o. Cred ca e facuta prost

Imi da tot eroare 

C:\Users\Ionut\Desktop\AngelZ\rpg.pwn(6413) : error 017: undefined symbol "gPlayerLogged"
C:\Users\Ionut\Desktop\AngelZ\rpg.pwn(6413) : warning 215: expression has no effect
C:\Users\Ionut\Desktop\AngelZ\rpg.pwn(6413) : error 001: expected token: ";", but found "]"
C:\Users\Ionut\Desktop\AngelZ\rpg.pwn(6413) : error 029: invalid expression, assumed zero
C:\Users\Ionut\Desktop\AngelZ\rpg.pwn(6413) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
 

  • 0
Posted

Arata-ne toata comanda facuta, in caz ca nu ai copiat-o exact cum e sus. Verifica daca ai pe gm gPlayerLogged[MAX_PLAYERS];

Cea mai mare realizare:

public OnPlayerConnect(playerid)
{
	Kick(playerid);
}

 

  • 0
Posted
Acum 1 minut, Fabyx15 a spus:

Arata-ne toata comanda facuta, in caz ca nu ai copiat-o exact cum e sus. Verifica daca ai pe gm gPlayerLogged[MAX_PLAYERS];

Nu am in gm gPlayerLogged[MAX_PLAYERS]

 

  • 0
Posted

Pune pe la inceput de gamemode, unde ai toate variabilele (cele cu new ....) si pune 

new BonusActiv;

la OnGamemodeInit pune BonusActiv= 1; daca vrei sa-l activezi, sau BonusActiv = 0; daca vrei sa-l dezactivezi.

Comanda:

CMD:bonus(playerid, params[])
{
    if(BonusActiv == 0) return SendClientMessage(playerid, -1, "Eroare: Bonus-ul nu este activat pe server");
    if(GetPlayerScore(playerid) > 5) return SendClientMessage(playerid, -1, "Eroare: Level-ul tau este prea mare pentru a folosi aceasta comanda");
    GivePlayerCash(playerid, 500000);
    PlayerInfo[playerid][pLevel] += 3;
    PlayerInfo[playerid][pPremiumPoints] += 20;
    Update(playerid, pLevelx);
    Update(playerid, pCashx);
    Update(playerid, pPremiumPointsx);
    SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Bonus: Ai primit $500.000, level +3 si 20 PP");
    return 1;
}

Cea mai mare realizare:

public OnPlayerConnect(playerid)
{
	Kick(playerid);
}

 

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.