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
#2

opp browser mess up when trying to edit post sorry for double post
Reply
#3

I don't completely understand.. Do you want it so it will work inside OnPlayerCommandText? Without zcmd?
Reply
#4

Inside OnPlayerCommandText
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)