Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Give Cookie script help

$
0
0
Code:

CMD:givecookie(playerid, params[]) // CMD for giving somebody a cookie
{
        new str[250];
        if(PlayerInfo[playerid][Level] >= 3)
        {
            if(sscanf(params, "u", playerid)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /givecookie [Player ID]");
            if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_YELLOW, "PlayerID is not connected.");

            PlayerInfo[playerid][Cookies] += 1;
            format(str, sizeof(str), "**Admin %s (ID:%d) has give a cookie to %s.(ID:%d) and %s cookie count is (%d)",PlayerName2(playerid),playerid, PlayerName2(playerid),playerid,PlayerName2(playerid),PlayerInfo[playerid][Cookies]);
            SendClientMessageToAll(COLOR_ORANGE, str);
            GameTextForPlayer(playerid,"~g~~h~~h~Cookie",3000,4);
            format(str, sizeof(str), "**You just gave a cookie to %s.", PlayerName2(playerid));
            SendClientMessage(playerid, COLOR_GREEN, str);

        }
        else SendClientMessage(playerid, COLOR_YELLOW, "**You're not authorized to use this command.");
        return 1;
}

help with this cookie system

when i did /givecookie ID

it only give 1 cookies

how to give /givecookie ID Amount?

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>