#1

Okay so I have this code of giving someone a cookie
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256], idx, file[128], tmp[256];
cmd = strtok(cmdtext, idx);

if(strcmp(cmd, "/cookies", true) == 0)
 {
 if(IsPlayerLuxAdmin(playerid))
  {
  new name[MAX_PLAYER_NAME];
  tmp = strtok(cmdtext, idx);
  GetPlayerName(playerid, name, sizeof(name));
  if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /cookies [playerid] [amount]");
  format(file,sizeof(file),"%s.ini",name);
  if(!fexist(file))
   {
   dini_Create(file);
   dini_IntSet(file,"Cookies", 0);
   }
  }
  }
return 1;
}
Problem: I'm stuck and don't know how to give that playerid a cookie. All I can do is give myself a cookie

________
RHODE ISLAND DISPENSARY
Reply


Messages In This Thread
Help - by ViruZZzZ_ChiLLL - 30.04.2010, 20:58
Re: Help - by Dolph - 30.04.2010, 21:01
Re: Help - by maij - 30.04.2010, 21:08

Forum Jump:


Users browsing this thread: 1 Guest(s)