SA-MP Forums Archive
Help with cmd - 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: Help with cmd (/showthread.php?tid=369569)



Help with cmd - cssbart - 17.08.2012

i got this cmd im making to change house vehicle number plate but it want it to say if its over 8 letters long so the person will have to change it(somthing like this plate is over 8 letters).
so i need some sort of code on houseplate like

if house plate is over 8 letters sendclientmessage "number plate you have choosen is to long (8 letters max)"

Код:
	if(strcmp(cmd, "/houseplate", true) == 0 && IsPlayerConnected(playerid))
	{
	    new house = PlayerInfo[playerid][pPhousekey];
     	new house2 = PlayerInfo[playerid][pPhousekey2];
	    tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /houseplate [1/2] [Plate]    Note: only 8 letters MAX");
			return 1;
		}
		new hous = strval(tmp);
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /houseplate [1/2] [Plate]    Note: only 8 letters MAX");
			return 1;
		}
		new houseplate = strval(tmp);
		
		return 1;
	}