20.12.2017, 15:50
Код:
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; }
when i did /givecookie ID
it only give 1 cookies
how to give /givecookie ID Amount?