DOF2 doesn't add "+1" in flie, why this?
#1

Hello,
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); 
the all code:
PHP код:
    if(strcmp(cmd"/Kick"true) == || strcmp(cmd"/k"true) == 0)
    {
        if(
GetAdminLevel(playerid) < 1) return SendClientMessage(playeridCOLOR_WHITE"SERVER: Unknown Command.");
        if(!
strlen(tmp)) return SendClientMessage(playeridCOLOR_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(playeridCOLOR_RED"USAGE: /Kick(K) [id] [reason]");
        
format(strsizeof(str),"***%s has been kicked by Admin %s - (Reason: %s)"GetName(id), GetName(playerid), (result));
        
SendClientMessageToAll(COLOR_REDstr);DOF2_SetInt(DFile(playerid),"Kicks",DOF2_GetInt(DFile(playerid),"Kicks")+1);
        
Kick(id);
          return 
1;
    } 
please help.
Reply
#2

Save in one variable, Example:

pawn Код:
enum //Your enum
{
     Kicks
};

// Command For Kick

// Example:

PlayerInfo[giveplayerid][Kicks]++;

// For Save

DOF2_SetInt(DFile(playerid), PlayerInfo[playerid][Kicks]);
Try it.
Reply
#3

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
Save in one variable, Example:

pawn Код:
enum //Your enum
{
     Kicks
};

// Command For Kick

// Example:

PlayerInfo[giveplayerid][Kicks]++;

// For Save

DOF2_SetInt(DFile(playerid), PlayerInfo[playerid][Kicks]);
Try it.
LOL ?
this add more "+1" on flie? I dont think ><"
You can show it for me on the all command please?
Reply
#4

Help please.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)