Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:setcookies(playerid, params[])
- {
- if(User[playerid][accountAdmin] >= 1)
- {
- if(sscanf(params, "ui", pid, amount)) return SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "USAGE: /setcookies [Player ID] [Amount]");
- if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOR_RED, "PlayerID is not connected");
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- PlayerPlaySound(pid, 1057, 0.0, 0.0, 0.0);
- pInfo[playerid][Cookies] = 0;
- pInfo[pid][Cookies] += amount;
- format(str, sizeof(str), "* Admin %s (ID:%d) Set %s(ID:%d) cookies... %s has %d cookies",pName(playerid),playerid, pName(pid),pid,pName(pid),pInfo[pid][Cookies]);
- SendClientMessageToAll(COLOR_GREEN, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "-ERROR- Only admins can use this command.");
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment