Not working properly
#2

Try this instead of what you got going there. Although it looks like you'll have to convert the code there o.O

I didn't see that, i just gave you the /cookie commad outta my script XD


Код:
CMD:cookie(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 1)
	{
	    new playa,amount;
	    if(!sscanf(params, "ui", playa, amount))
	    {
	        if(IsPlayerConnected(playa))
	        {
	            if(playa == playerid && PlayerInfo[playerid][pAdmin] < 9999)
	            {
	                SendClientMessage(playerid, COLOR_LIGHTRED, "   You can't award cookies to yourself!");
	                return 1;
				}
	            PlayerInfo[playa][pCookies] += amount;
	            new string[128];
	            format(string, sizeof(string), "* Admin %s awared you with %d cookies.", PlayerNameEx(playerid), amount);
	            SendClientMessage(playa, COLOR_ORANGE, string);
	            format(string, sizeof(string), "* You awarded %s with %d cookies.", PlayerNameEx(playa), amount);
	            SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
	            format(string, sizeof(string), "AdmCmd: %s awarded %d cookie(s) to %s!", PlayerNameEx(playerid), amount, PlayerNameEx(playa));
	            BroadCast(COLOR_GREENISHGOLD, string);
	            return 1;
	        }
	        else
	        {
	            SendClientMessage(playerid, COLOR_LIGHTRED, "   Invalid player!");
	            return 1;
			}
	    }
	    else
	    {
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: /Cookie [playerid/PartOfName] [Amount]");
			SendClientMessage(playerid, COLOR_LIGHTBLUE, "Gives the player an RP cookie.(Negative amounts possible)");
		}
	}
	return 1;
}
Reply


Messages In This Thread
Not working properly - by Fernado Samuel - 13.01.2013, 21:32
Re: Not working properly - by Jay_Dixon - 14.01.2013, 00:42

Forum Jump:


Users browsing this thread: 1 Guest(s)