Getting Server Unknown Command
#1

why do i get Server Unknown command on enterin the Slot Number.
Код:
	if(strcmp(cmd, "/sellcar", true) == 0)
	{
	    new car1 = PlayerInfo[playerid][CarLinkID];
	    new car2 = PlayerInfo[playerid][Car2LinkID];
	   	if(car1 == 0 && car2 == 0) return SendClientMessage(playerid, COLOR_GREY, "   You do not own a car.");
	   	tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_GREY, "USAGE: /sellcar [playerid/PartOfName] [price] [Vehicle Number(1 - 2)]");
			return 1;
		}
		giveplayerid = ReturnUser(tmp);
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_GREY, "USAGE: /sellcar [playerid/PartOfName] [price] [Vehicle Number(1 - 2)]");
			return 1;
		}
		new price = strvalEx(tmp);
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_GREY, "USAGE: /sellcar [playerid/PartOfName] [price] [Vehicle Number(1 - 2)]");
			return 1;
		}
		new stuff = strvalEx(tmp);
		if(price < 50000 || price > 15000000) return SendClientMessage(playerid, COLOR_GREY, "   Price cannot be lower than $50,000 or higher than $15,000,000.");
	    if(playerid == giveplayerid)
	    {
	        return SendClientMessage(playerid, COLOR_GREY, "   You cannot sell yourself a car.");
	    }
	   	if(PlayerInfo[giveplayerid][CarLinkID] != 0 && PlayerInfo[giveplayerid][Car2LinkID] != 0)
	   	{
	   	    return SendClientMessage(playerid, COLOR_GREY, "   That player already owns two cars.");
	   	}
	   	if(!ProxDetectorS(10.0, playerid, giveplayerid))
		{
		    return SendClientMessage(playerid, COLOR_GREY, "   That player is not near you.");
		}
		if( stuff == 1 )
		{
		    sellcarvehicle = PlayerInfo[playerid][CarLinkID];
		}
		else if( stuff == 2 )
		{
		    sellcarvehicle = PlayerInfo[playerid][Car2LinkID];
		}
	   	format(string, sizeof(string), "* You offered %s to buy your car (%s) for $%d.",RemoveUnderScore(giveplayerid),vehName[sellcarvehicle-400],price);
		SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		format(string, sizeof(string), "* %s wants to sell you a car (%s) for $%d, (type /accept car) to accept.",RemoveUnderScore(playerid),vehName[sellcarvehicle-400],price);
		SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
		format(string, sizeof(string),"* %s hands %s the contract to their car.",RemoveUnderScore(playerid),RemoveUnderScore(giveplayerid));
		ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		CarOffer[giveplayerid] = playerid;
		CarPrice[giveplayerid] = price;
		CarID[giveplayerid] = sellcarvehicle;
		CarSlot[giveplayerid] = stuff;
		return 1;
	}
Reply
#2

try zcmd or dcmd it's old
Reply
#3

As AroseKhanNaizi suggested, try upgrading to a more stable command processing system, like ZCMD.

Here's the ZCMD thread - https://sampforum.blast.hk/showthread.php?tid=91354
Reply
#4

All the commands are like this. i dunno how to convert them it's too long...
can anyone help me ?
Reply
#5

anyone ??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)