Jump to content
  • 0

Question

Posted

Salut! si bine te-am gasit ! dupa cum vezi in  titul am nevoie de o comanda si nu imi iese aceea comanda este [/bonus] care am incercat sa iti dea level 2 si 300.00.00$

10 answers to this question

Recommended Posts

  • 0
Posted (edited)
new	BonusActiv = 0;

Comanda activatebonus: 

CMD:activatebonus(playerid, params[]) //-> Cu aceasta comanda activezi bonus-ul [/bonus]
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first. .");
	if(IsPlayerConnected(playerid))
 	{
 	    if (PlayerInfo[playerid][pAdmin] >= 4)
		{
		    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;
}

Comanda bonus:

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, 69000000); // -> Cash $
 	        	PlayerInfo[playerid][pLevel] = 69; // -> Level-ul
 	        	PlayerInfo[playerid][pExp] += 69; // -> RespectPoints
 	        	Update(playerid, pLevelx);
 	        	Update(playerid, pCashx);
 	        	Update(playerid, pExp);
 	        	SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
 	        	SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit $69.000.000, 69 rp-uri si level 69 de bun venit!");
			}
			else return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu poti folosi aceasta comanda daca ai level 3+ !");
		}
	}
	return 1;
}new	BonusActiv = 0;

Comanda activatebonus: 

CMD:activatebonus(playerid, params[]) //-> Cu aceasta comanda activezi bonus-ul [/bonus]
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first. .");
	if(IsPlayerConnected(playerid))
 	{
 	    if (PlayerInfo[playerid][pAdmin] >= 4)
		{
		    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;
}

 

Edited by xAlexutzuDsK_
  • 0
Posted
Acum 2 ore, xAlexutzuDsK_ a spus:

new	BonusActiv = 0;

Comanda activatebonus: 

CMD:activatebonus(playerid, params[]) //-> Cu aceasta comanda activezi bonus-ul [/bonus]
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first. .");
	if(IsPlayerConnected(playerid))
 	{
 	    if (PlayerInfo[playerid][pAdmin] >= 4)
		{
		    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;
}

Comanda bonus:

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, 69000000); // -> Cash $
 	        	PlayerInfo[playerid][pLevel] = 69; // -> Level-ul
 	        	PlayerInfo[playerid][pExp] += 69; // -> RespectPoints
 	        	Update(playerid, pLevelx);
 	        	Update(playerid, pCashx);
 	        	Update(playerid, pExp);
 	        	SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
 	        	SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit $69.000.000, 69 rp-uri si level 69 de bun venit!");
			}
			else return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu poti folosi aceasta comanda daca ai level 3+ !");
		}
	}
	return 1;
}new	BonusActiv = 0;

Comanda activatebonus: 

CMD:activatebonus(playerid, params[]) //-> Cu aceasta comanda activezi bonus-ul [/bonus]
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first. .");
	if(IsPlayerConnected(playerid))
 	{
 	    if (PlayerInfo[playerid][pAdmin] >= 4)
		{
		    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;
}

Comanda bonus:

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, 69000000); // -> Cash $
 	        	PlayerInfo[playerid][pLevel] = 69; // -> Level-ul
 	        	PlayerInfo[playerid][pExp] += 69; // -> RespectPoints
 	        	Update(playerid, pLevelx);
 	        	Update(playerid, pCashx);
 	        	Update(playerid, pExp);
 	        	SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
 	        	SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit $69.000.000, 69 rp-uri si level 69 de bun venit!");
			}
			else return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu poti folosi aceasta comanda daca ai level 3+ !");
		}
	}
	return 1;
}

 

Tot nu merge... nustiu ce sa-i mai fac .. imi da 4 errori incerc sa le rezorv si mai dau inca 20

  • 0
Posted (edited)
Acum 2 ore, MrAndy a spus:

Salut! si bine te-am gasit ! dupa cum vezi in  titul am nevoie de o comanda si nu imi iese aceea comanda este [/bonus] care am incercat sa iti dea level 2 si 300.00.00$

Te duci la OnpPlayerCommandText si adaugi urmatoarele:

if(strcmp(cmd, "/bonus", true) == 0)
    {
         if(PlayerToPoint(1.0, playerid, Aici pui coordonatele unde playerul poate scrie comanda de exemplu unde il spawneza))
         {
            if(PlayerInfo[playerid][pLevel] <= 1)
            {
                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    SendClientMessage(playerid,COLOR_LIGHTGREEN,"{CCDEE0}Felicitari.Ai primit Level 3 si 5000{00FA1D} LEI {CCDEE0}Bonus! ");
                    SendClientMessage(playerid,COLOR_LIGHTGREEN,"O zi buna in continuare alaturi de {7E82CA}RuGmy{EC7365}RPG !");
                    GivePlayerCash(playerid, 5000);
                    PlayerInfo[playerid][pLevel] = 3;
                    format(string, sizeof(string), "UPDATE players SET PlayerLevel='%d' WHERE id=%d", PlayerInfo[playerid][pLevel]);
            }
        }
        return 1;
    }


                   Dupa accea te duci si creezi un text3D:
CreateDynamic3DTextLabel("{DB1616}Bonus din partea ..............\n{ECC962}Scrie /Bonus pentru a-ti lua Bonus-ul",0xFFFFFFFF,Aici pui coordonatele unde vrei sa scrie si unde sa dea /bonus bine ar fi sa pui aceleasi coordonate ca cele de mai sus, 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0);

 

DAca nu ai inteles ceva dai reply aici
 

Edited by Extremys
Greseala

giphy.gif

  • 0
Posted

Pai e normal sa nu iti mearga :)) pentru ca tu ai alte functii definite in GameMode ..

 

PlayerInfo[playerid][pLevel] = 69; // -> Level-ul
 	        	PlayerInfo[playerid][pExp] += 69; // -> RespectPoints
 	        	Update(playerid, pLevelx);
 	        	Update(playerid, pCashx);
 	        	Update(playerid, pExp);

 

 

  • 0
Posted
Acum 2 ore, VenoWW a spus:

Pai e normal sa nu iti mearga :)) pentru ca tu ai alte functii definite in GameMode ..

 


PlayerInfo[playerid][pLevel] = 69; // -> Level-ul
 	        	PlayerInfo[playerid][pExp] += 69; // -> RespectPoints
 	        	Update(playerid, pLevelx);
 	        	Update(playerid, pCashx);
 	        	Update(playerid, pExp);

 

 

si astea unde se pun?... din cate tin eu minte in 'GamemodeOnEdit' ceva in gen

  • 0
Posted
Acum 3 minute, MrAndy a spus:

si astea unde se pun?... din cate tin eu minte in 'GamemodeOnEdit' ceva in gen

Nu se pun ma nicaieri! Trebuie sa cauti cum ai tu definite acele functii

In loc de pLevelx poate tu ai PlayerLevel sau pLevel! Da-mi pm si te ajut

  • 0
Posted
Acum 2 ore, VenoWW a spus:

Nu se pun ma nicaieri! Trebuie sa cauti cum ai tu definite acele functii

In loc de pLevelx poate tu ai PlayerLevel sau pLevel! Da-mi pm si te ajut

Nu , am cum ai spus tu , dar nustiu unde sa le pun.. :|

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.