SA-MP Forums Archive
/statistika - Server Uknown command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /statistika - Server Uknown command (/showthread.php?tid=658172)



/statistika - Server Uknown command - Dimkata - 26.08.2018

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


Re: /statistika - Server Uknown command - severance - 26.08.2018

Did you put return 1 at the end of the code


Re: /statistika - Server Uknown command - Dimkata - 26.08.2018

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;
	}



Re: /statistika - Server Uknown command - DerickClark - 26.08.2018

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


Re: /statistika - Server Uknown command - KinderClans - 26.08.2018

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.


Re: /statistika - Server Uknown command - Dimkata - 26.08.2018

Working with zcmd.

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



Re: /statistika - Server Uknown command - DerickClark - 26.08.2018

Your code must return 1.


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



Re: /statistika - Server Uknown command - KinderClans - 26.08.2018

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