05.10.2012, 15:28
Hello,
I build a commend if id do it that add "+1" on the flie ini and this not add.
the code:
the all code:
please help.
I build a commend if id do it that add "+1" on the flie ini and this not add.
the code:
PHP код:
DOF2_SetInt(DFile(playerid),"Kicks",DOF2_GetInt(DFile(playerid),"Kicks")+1);
PHP код:
if(strcmp(cmd, "/Kick", true) == 0 || strcmp(cmd, "/k", true) == 0)
{
if(GetAdminLevel(playerid) < 1) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown Command.");
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /Kick(K) [id] [reason]");
id = strval(tmp); new length = strlen(cmdtext);while ((idx < length) && (cmdtext[idx] <= ' ')){
idx++;}new offset = idx,result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))){result[idx - offset] = cmdtext[idx];idx++;}
if(!strlen(result)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /Kick(K) [id] [reason]");
format(str, sizeof(str),"***%s has been kicked by Admin %s - (Reason: %s)", GetName(id), GetName(playerid), (result));
SendClientMessageToAll(COLOR_RED, str);DOF2_SetInt(DFile(playerid),"Kicks",DOF2_GetInt(DFile(playerid),"Kicks")+1);
Kick(id);
return 1;
}