Jump to content

Cerere tutorial comanda /adcmds


lordhell12

Recommended Posts

Salutare,as vrea si eu sa ma invatati cum sa creez comanda /adcmds.Aceasta trebuie sa arate comenzile de admin in chat sau intr-un dialog,mi-e indiferent.

Iar ca sa folosesti comanda sa iti trebuieasca nivel 1 admin.

Am incercat eu sa adaug comanda din diferite sisteme de admin/gamemode-uri,dar am reusit sa dau numai de erori.

Edited by lordhell12
Link to comment
Share on other sites

CMD:adcmds(playerid, params[])
{
	if(playerVariables[playerid][pAdminLevel] >= 1)
	{
	    if(playerVariables[playerid][pAdminLevel] >= 1)
		{
          SCM(playerid,COLOR_TEAL,"Level 1: /comanda1 /comanda2 /comanda3 /comanda4);
        }
   		if(playerVariables[playerid][pAdminLevel] >= 2)
		{
          SCM(playerid,COLOR_TEAL,"Level 2: /comanda1 /comanda2 /comanda3 /comanda4);
		}
   		if(playerVariables[playerid][pAdminLevel] >= 3)
		{
           SCM(playerid,COLOR_TEAL,"Level 3: /comanda1 /comanda2 /comanda3 /comanda4);
		}
   		if(playerVariables[playerid][pAdminLevel] >= 4)
		{
           SCM(playerid,COLOR_TEAL,"Level 4: /comanda1 /comanda2 /comanda3 /comanda4);
		}
   		if(playerVariables[playerid][pAdminLevel] >= 5)
		{
           SCM(playerid,COLOR_TEAL,"Level 5: /comanda1 /comanda2 /comanda3 /comanda4);
		}
   		if(playerVariables[playerid][pAdminLevel] >= 6)
		{
		   SCM(playerid,COLOR_TEAL,"Level 6: /comanda1 /comanda2 /comanda3 /comanda4);
		}
	}
	return 1;
}

Poftim,sper ca te-am ajutat,si in loc de comanda 1 comanda 2 etc iti pui tu comenzile

Edited by Sammich
Link to comment
Share on other sites

CMD:adcmds(playerid, params[])
{
	if(playerVariables[playerid][pAdminLevel] >= 1)
	{
	    if(playerVariables[playerid][pAdminLevel] >= 1)
		{
          SCM(playerid,COLOR_TEAL,"Level 1: /comanda1 /comanda2 /comanda3 /comanda4);
        }
   		if(playerVariables[playerid][pAdminLevel] >= 2)
		{
          SCM(playerid,COLOR_TEAL,"Level 2: /comanda1 /comanda2 /comanda3 /comanda4);
		}
   		if(playerVariables[playerid][pAdminLevel] >= 3)
		{
           SCM(playerid,COLOR_TEAL,"Level 3: /comanda1 /comanda2 /comanda3 /comanda4);
		}
   		if(playerVariables[playerid][pAdminLevel] >= 4)
		{
           SCM(playerid,COLOR_TEAL,"Level 4: /comanda1 /comanda2 /comanda3 /comanda4);
		}
   		if(playerVariables[playerid][pAdminLevel] >= 5)
		{
           SCM(playerid,COLOR_TEAL,"Level 5: /comanda1 /comanda2 /comanda3 /comanda4);
		}
   		if(playerVariables[playerid][pAdminLevel] >= 6)
		{
		   SCM(playerid,COLOR_TEAL,"Level 6: /comanda1 /comanda2 /comanda3 /comanda4);
		}
	}
	return 1;
}

Poftim,sper ca te-am ajutat,si in loc de comanda 1 comanda 2 etc iti pui tu comenzile

C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12617) : error 029: invalid expression, assumed zero
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12617) : warning 215: expression has no effect
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12617) : error 001: expected token: ";", but found "]"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12617) : error 029: invalid expression, assumed zero
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12617) : fatal error 107: too many error messages on one line

Am primit aceste erori acum

Linia 12617 este :     if(playerVariables[playerid][pAdminLevel] >= 1)

Link to comment
Share on other sites

C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12617) : error 029: invalid expression, assumed zero
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12617) : warning 215: expression has no effect
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12617) : error 001: expected token: ";", but found "]"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12617) : error 029: invalid expression, assumed zero
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12617) : fatal error 107: too many error messages on one line

Am primit aceste erori acum

Linia 12617 este :     if(playerVariables[playerid][pAdminLevel] >= 1)

Tu cum ai pAdmin sau pAdminLevel?

Link to comment
Share on other sites

Foloseste in loc de PlayerInfo[playerid][pLevel] , functia cu care citeste server-ul , gradul unui player .

Ultima chestia care am facut-o la aceasta comanda a fost sa definesc SCM,dupa ce am facut asta am dat compile si mi-au aparut urmatoarele erori.

C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(3741) : error 017: undefined symbol "cmd_football"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(3744) : error 017: undefined symbol "cmd_teles"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(5819) : error 017: undefined symbol "cmd_buy"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(5820) : error 017: undefined symbol "cmd_sell"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(5821) : error 017: undefined symbol "cmd_lock"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(5822) : error 017: undefined symbol "cmd_unlock"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(5823) : error 017: undefined symbol "cmd_enter"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12620) : error 017: undefined symbol "COLOR_TEAL"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12620 -- 12622) : warning 215: expression has no effect
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12622) : error 001: expected token: ";", but found "if"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12624) : error 017: undefined symbol "COLOR_TEAL"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12624 -- 12626) : warning 215: expression has no effect
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12626) : error 001: expected token: ";", but found "if"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12628) : error 017: undefined symbol "COLOR_TEAL"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12628 -- 12630) : warning 215: expression has no effect
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12630) : error 001: expected token: ";", but found "if"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12632) : error 017: undefined symbol "COLOR_TEAL"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12632 -- 12634) : warning 215: expression has no effect
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12634) : error 001: expected token: ";", but found "if"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12636) : error 017: undefined symbol "COLOR_TEAL"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12636 -- 12638) : warning 215: expression has no effect
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12638) : error 001: expected token: ";", but found "if"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12640) : error 017: undefined symbol "COLOR_TEAL"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12646) : error 029: invalid expression, assumed zero
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12646) : error 017: undefined symbol "cmd_ban"
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12646) : error 029: invalid expression, assumed zero
C:\Users\LordH3ll\Desktop\Windows\gamemodes\ESS.pwn(12646) : fatal error 107: too many error messages on one line

Inainte sa bag comanda asta totul era okay.

Link to comment
Share on other sites

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.