[Need help] Commands
#1

I started a new GM, and, if i want to add a command, it dosen't work. No errors, but in game don't appear nothing if I enter the command.
Sorry for my English.
Reply
#2

Quote:
Originally Posted by Nathaniel
Посмотреть сообщение
I started a new GM, and, if i want to add a command, it dosen't work. No errors, but in game don't appear nothing if I enter the command.
Sorry for my English.
We can help you by fixing them please consider sharing your command (you made) here so we examine and fix it.

-FalconX
Reply
#3

Not just a command, every command I put in the GM, look.

Код:
	if (strcmp (Comanda, "/asetadmin", true) == 0)
	{
	    new Mesaj [256];
		new Format [256];
		new Trimitator [MAX_PLAYER_NAME];
		new Receptor [MAX_PLAYER_NAME];
		new Receptor_ID;
		if (PlayerInfo [playerid] [pAdmin] == 4)
		{
		    Format = strtok (cmdtext, Variabila);
		    if (!strlen (Format))
		    {
		        SendClientMessage (playerid, 0xFFFFFF, "{CC0000}*** {336633}[Informatie] {FFCC99}Formatul corect al acestei comenzi este : '/asetadmin [ID Jucator] [Nivel Admin]'. {CC0000}***");
				return 1;
			}
			Receptor_ID = ReturnUser (Format);
			Format = strtok (cmdtext, Variabila);
			new Nivel = strval (Format);
			if (Receptor_ID != INVALID_PLAYER_ID)
			{
			    GetPlayerName (Receptor_ID, Receptor, sizeof (Receptor));
			    GetPlayerName (playerid, Trimitator, sizeof (Trimitator));
			    PlayerInfo [Receptor_ID] [pAdmin] = Nivel;
			    format (Mesaj, sizeof (Mesaj), "{CC0000}*** {336633}[Informatie] {FFCC99}Ai fost promovat la statutul de Admin Level %d de Administratorul %s. Felicitari. {CC0000}***", Nivel, Trimitator);
			    SendClientMessage (Receptor_ID, 0xFFFFFF, Mesaj);
				format (Mesaj, sizeof (Mesaj), "{CC0000}*** {336633}[Informatie] {FFCC99}L-ai promovat la statutul de Admin Level %s pe %d. Speram sa nu dezamageasca. {CC0000}***", Receptor, PlayerInfo [Receptor_ID] [pAdmin]);
				SendClientMessage (playerid, 0xFFFFFF, Mesaj);
			}
			else if (Receptor_ID == INVALID_PLAYER_ID)
			{
			    format (Mesaj, sizeof (Mesaj), "{CC0000}*** {336633}[Informatie] {FFCC99}%i nu este conectat pe server. Verifica daca ai scris ID-ul corect. {CC0000}***", Receptor_ID);
			    SendClientMessage (playerid, 0xFFFFFF, Mesaj);
			}
		    
		}
		else
		{
		    SendClientMessage (playerid, 0xFFFFFF, "{CC0000}*** {336633}[Informatie] {FFCC99}Nu esti autorizat sa folosesti aceasta comanda. Ia legatura cu unul din membrii echipei noastre pentru mai multe detalii. {CC0000}***");
		}
		return 1;
	}
Reply
#4

Quote:
Originally Posted by Nathaniel
Посмотреть сообщение
Not just a command, every command I put in the GM, look.
Well, remember if you have an include called "zcmd" in your gamemode and you are trying to use strcmp command with it, it won't work. I will compile but it won't work in the server, it will just give you an error saying unknown command.

So if you have that included with your gamemode, remove it and have a try.

-FalconX
Reply
#5

I don't have that include.

This is the GM.

http://pastebin.com/U5pQPGg1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)