/statistika - Server Uknown command
#1

Hello guys.

I have the following problem. When I write /statistika in the chat i get "Server Unknown command" but the cmd is working fine..

Is there a way i can remove this?
https://imgur.com/YtXrjhC
Reply
#2

Did you put return 1 at the end of the code
Reply
#3

Here is the full code
Код:
//------------------------------------------------------------------------------
	if(strcmp(cmd, "/statistika", true) == 0)
	{
     	if(IsPlayerConnected(playerid))
	    {
 			if(F6STATS[playerid] == 1)
   			{
     			SendClientMessage(playerid, WHITE, "{FF0000}GRESKA:{FFFFFF}Nemozete da koristite komandi vo momentot !");
       			return 1;
        	}
			if (gPlayerLogged[playerid] != 0)
			{
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "%s ja poglednuva svojata licna karta", sendername);
				ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 100.0, 5000);
                ShowStats(playerid,playerid);
			}
			else
			{
				SendClientMessage(playerid,-1, "{FF0000}GRESKA:{FFFFFF}Ne ste logirani.");
			}
		}
		return 1;
	}
Reply
#4

Quote:
Originally Posted by bgedition
Посмотреть сообщение
[WRONG] - sorry
Then point it out. what's wrong.

BTW. Check here. https://sampforum.blast.hk/showthread.php?tid=199796
Reply
#5

A hint: We're in 2018, we have sscanf and zcmd/y_cmd. No need to use this outdated and old command processors with strcmp.
Reply
#6

Working with zcmd.

How do I make this? I get error "sendername"
Код:
GetPlayerName(playerid, sendername, sizeof(sendername));
Reply
#7

Your code must return 1.


check your code.
Код:
if (gPlayerLogged[playerid] != 0) <--- Are you login?
Reply
#8

Why people stick with != ?? That's fuckin confusing and useless. Just use == 0 or
pawn Код:
if (!gPlayerLogged[playerid])
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)