SA-MP Forums Archive
Command doest work... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command doest work... (/showthread.php?tid=167334)



Command doest work... - almighty - 11.08.2010

Hi... Its me... once again... xD... im making a command for voting for maps, i have this

Код:
dcmd_mapvote(playerid,params[])
{
	if(!strlen(params)) return SendClientMessage(playerid,COLOR_SERVER_WARNING,"USAGE: '/MAPVOTE [MAP NUMER]', use '/MAPS' for a list of maps!");
	if(Voting != 1) return SendClientMessage(playerid,COLOR_SERVER_WARNING,"There is a voting procces right now, please wait for the next one!");
	if(Voted[playerid] == 1) return SendClientMessage(playerid,COLOR_SERVER_WARNING,"You have voted already!");
	if(params[0] == strlen("MYMAP)) ******************************************
	{
	    MH += 1;
		Voted[playerid] = 1;
		SendClientMessage(playerid,COLOR_SERVER,"Thanks for your vote, please wait for the voting process to be over");
	}
	else return SendClientMessage(playerid,COLOR_SERVER_WARNING,"That option doesnt exist, use '/MAPS' to see available options!");
	return 1;
}
problem is it wont enter to the if place... no matter what, i ave also tried strval("MYMAP")) and with numbers but it wont do... I dont know what else to do......


Re: Command doest work... - Kevin_Joshen - 11.08.2010

I think seeing more of your code might help. unless i'm just a idiot. =D


Re: Command doest work... - almighty - 12.08.2010

Thats the whole code for the command... i dont have nothing else... Should i try sscanf?