30.04.2010, 20:58
(
Последний раз редактировалось ViruZZzZ_ChiLLL; 25.02.2011 в 00:29.
)
Okay so I have this code of giving someone a cookie
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
Код:
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;
}

________
RHODE ISLAND DISPENSARY

