SERVER: Unknown Command
#5

Quote:
Originally Posted by Slawi
Посмотреть сообщение
post here the code of weapon-config

ans show some of other commands
Weapon-config is the Slice Include here: https://sampforum.blast.hk/showthread.php?tid=563387

These are two commands that are similar to the two commands I'm having issues with, in that they both deal with setting health/armor. Both work.
Код:
CMD<AD1>:shp(cmdid, playerid, params[])
{
	new targetid, amount;
    if(sscanf(params, "ui", targetid, amount)) return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /shp [playerid] [amount]");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, NOPLAYER);
	if(LoggedIn[targetid] != true) return SendClientMessage(playerid, COLOR_RED, NOTLOGGEDIN);
	SetPlayerHealth(targetid, amount);
	new buf[150];
	format(buf, sizeof(buf), "You have set %s's health to %d.", GetName(targetid), amount);
	SendClientMessage(playerid, COLOR_RED, buf);
	return 1;
}
Код:
CMD<AD1>:sarm(cmdid, playerid, params[])
{
	new targetid, amount;
    if(sscanf(params, "ui", targetid, amount)) return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /sarm [playerid] [amount]");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, NOPLAYER);
	if(LoggedIn[targetid] != true) return SendClientMessage(playerid, COLOR_RED, NOTLOGGEDIN);
	SetPlayerArmour(targetid, amount);
	new buf[150];
	format(buf, sizeof(buf), "You have set %s's armour to %d.", GetName(targetid), amount);
	SendClientMessage(playerid, COLOR_RED, buf);
	return 1;
}
Reply


Messages In This Thread
SERVER: Unknown Command - by Intellects - 26.06.2018, 21:10
Re: SERVER: Unknown Command - by Slawi - 27.06.2018, 00:14
Re: SERVER: Unknown Command - by Intellects - 27.06.2018, 00:30
Re: SERVER: Unknown Command - by Slawi - 27.06.2018, 00:54
Re: SERVER: Unknown Command - by Intellects - 27.06.2018, 01:19
Re: SERVER: Unknown Command - by Intellects - 27.06.2018, 01:35
Re: SERVER: Unknown Command - by Verc - 27.06.2018, 03:46

Forum Jump:


Users browsing this thread: 1 Guest(s)