Changing A Command Type
#1

Okay well i belive you can have like on player command text and then you have this. How would i convert this to just the on player command text

Код:
command(heal, playerid, params[])
{
	new	userid, price;
	if (sscanf(params, "ud", userid, price)) SendClientMessage(playerid, COLOR_WHITE, "/heal [playerid] [price]");
	else
	{
		if(IsPlayerConnected(userid))
		{
		    if(DynamicFactions[pStats[playerid][pFaction]][fType] == 2)
		    {
		        if(price >= 500)
		        {
		            SendClientMessage(playerid, COLOR_WHITE, "You're unable to charge above $500.");
		            return 1;
		        }
		    	new string[128];
		    	format(string, sizeof(string), "You have been healed by %s, for $%d.", GetPlayerNameEx(playerid), price);
    			SendClientMessage(userid, COLOR_WHITE, string);
    			SetPlayerHealth(userid, 100);
		    	format(string, sizeof(string), "You have healed %s, for $%d.", GetPlayerNameEx(userid), price);
    			SendClientMessage(playerid, COLOR_WHITE, string);
    		}
    		else
    		{
    		    SendClientMessage(playerid, COLOR_WHITE, "Invalid faction/type");
    		}
		}
Reply


Messages In This Thread
Changing A Command Type - by robert4049 - 18.07.2010, 09:03
Re: Changing A Command Type - by robert4049 - 18.07.2010, 10:22
Re: Changing A Command Type - by TheInnocentOne - 18.07.2010, 10:28
Re: Changing A Command Type - by robert4049 - 18.07.2010, 10:32

Forum Jump:


Users browsing this thread: 1 Guest(s)