06.03.2012, 02:29
Hi,
I'm wanting to make a command like /cookies [playerid] Which will check how many cookies the player has. I already have cookies in my scriptfiles, and whatnot. But how do I check the player's cookies, and then send a client message back to my player saying how much cookies he has? Here's what I got so far.
It's not finished yet. But what else do I need to add? Thanks!
I'm wanting to make a command like /cookies [playerid] Which will check how many cookies the player has. I already have cookies in my scriptfiles, and whatnot. But how do I check the player's cookies, and then send a client message back to my player saying how much cookies he has? Here's what I got so far.
pawn Код:
CMD:cookies(playerid, params[])
{
new pCookies;
new target;
new str[128];
if(sscanf(params, "u[128]", target)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cookies [Player ID]");
if!IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_BRIGHTRED, "ERROR: Player is not connected");
if(PlayerInfo[playerid][pAdmin] >=1
{
format(str, sizeof(str), "You have checked %s's Cookies.", GetName(target));
SendClientMessage(playerid, COLOR_CYAN, str);