SA-MP Forums Archive
*** Terrible Title Removed - 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: *** Terrible Title Removed (/showthread.php?tid=383156)



*** Terrible Title Removed - imnoob - 06.10.2012

i made cmd
Код:
if (strcmp(cmd, "/admins", true)  ==  0)
{
     SendClientMessage(playerid, COLOR_WHITE, " You cant see the admin list.");
     return 1;
}
AND WHEN I GO INGAME AND TYPE /admins nothing happens :S can some1 tell me how to fix it ? when player type /admins to say You cant see the admin list ?


Re: Please need help - gtakillerIV - 06.10.2012

@ Faisal_Khan: So what is he doing now? Posting a junk reply won't help.


Код:
if (strcmp("/admins", cmdtext, true, 7) == 0)
	{
		SendClientMessage(playerid, COLOR_WHITE, " You cant see the admin list.");
		return 1;
	}



Re: Please need help - imnoob - 07.10.2012

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
@ Faisal_Khan: So what is he doing now? Posting a junk reply won't help.


Код:
if (strcmp("/admins", cmdtext, true, 7) == 0)
	{
		SendClientMessage(playerid, COLOR_WHITE, " You cant see the admin list.");
		return 1;
	}
what? i dont understand what u saying

edit true, 7 wtf


Re: Please need help - imnoob - 23.10.2012

refresh


Re: Please need help - Dizzle - 23.10.2012

First of all tell us which admin system you are using, and second your command will show everyone who type /admins - "You cant see the admin list"


Re: Please need help - gtakillerIV - 23.10.2012

if (strcmp("/admins", cmdtext, true, 7) == 0)

Here we are comparing two strings with each other using strcmp.

"/admins" = What to look for.

"cmdtext" = The command that the player typed if it is /admins it will return our /admins command.

"true" = If they match.

"7" = The character length of "/admins" which is 7.


Here is more info:

https://sampwiki.blast.hk/wiki/Using_strcmp()


Re: *** Terrible Title Removed - Lynet - 21.11.2012

Dude, you compiled?lol