Give Cookie script help
#2

Try this
PHP код:
CMD:givecookie(playeridparams[]) // CMD for giving somebody a cookie
{
        new 
str[250], playeramount;
        if(
PlayerInfo[playerid][Level] >= 3)
        {
             if(
sscanf(params"ui"playeramount)) return SendClientMessage(playeridCOLOR_YELLOW"USAGE: /givecookie [Player ID] [Amount]");
             if(!
IsPlayerConnected(player)) return SendClientMessage(playeridCOLOR_YELLOW"PlayerID is not connected.");
             
PlayerInfo[player][Cookies] += amount;
             
format(strsizeof(str), "**Admin %s (ID:%d) has given %d cookie(s) to %s.(ID:%d) and %s cookie count is (%d)",PlayerName2(player),playeramountPlayerName2(player),playerid,PlayerName2(player),PlayerInfo[player][Cookies]);
             
SendClientMessageToAll(COLOR_ORANGEstr);
             
GameTextForPlayer(player,"~g~~h~~h~Cookie",3000,4);
             
format(strsizeof(str), "**You just gave %d cookie(s) to %s."amountPlayerName2(player));
             
SendClientMessage(playeridCOLOR_GREENstr);
        }
        else 
SendClientMessage(playeridCOLOR_YELLOW"**You're not authorized to use this command.");
        return 
1;

Reply


Messages In This Thread
Give Cookie script help - by KyNe - 20.12.2017, 15:50
Re: Give Cookie script help - by aoky - 20.12.2017, 15:54
Re: Give Cookie script help - by DelK - 20.12.2017, 15:59
Re: Give Cookie script help - by KyNe - 20.12.2017, 16:17
Re: Give Cookie script help - by aoky - 20.12.2017, 16:26
Re: Give Cookie script help - by KyNe - 20.12.2017, 16:35
Re: Give Cookie script help - by Kaperstone - 20.12.2017, 16:37
Re: Give Cookie script help - by KyNe - 20.12.2017, 16:39
Re: Give Cookie script help - by aoky - 20.12.2017, 16:40
Re: Give Cookie script help - by KyNe - 20.12.2017, 16:42

Forum Jump:


Users browsing this thread: 2 Guest(s)