SA-MP Forums Archive
[Solved] Problem with Dini - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Solved] Problem with Dini (/showthread.php?tid=90246)



[Solved] Problem with Dini - SiJ - 07.08.2009

Hey,
Here is my code:

pawn Код:
dcmd_kickmember(playerid, params[])
{
    if (pAdminLvl[playerid] >= 4)
    {
        new gangname[24], id;
        if (sscanf(params, "su",gangname, id))
        {
            UsageMsg(playerid, "USAGE: /kickmember <Gang Name> <PlayerID/PartOfName>");
        }
        else
        {
            new kick = KickFromGang(id,gangname);
            if(kick == -1) ErrorMsg(playerid,"This gang doesn't exist!");
            else
            {
                SendFMessage(id,COLOR_SYSTEM,"You have been kicked from gang %s by Admin!",gangname);
                SendFMessage(playerid,COLOR_SYSTEM,"You have kicked %s from gang %s!",PlayerName(id),gangname);
            }
        }
    }
}

stock KickFromGang(PlayerID,GangName[])
{
    if(!dini_Exists(GangName)) return -1;
    new str[512],name[24];
    GetPlayerName(PlayerID,name,24);
    str = dini_Get(GangName,"Members");
    new position = strfind(str,name,true);
    if(position != 1)
    {
        strdel(str, position, position + strlen(name) + 1);
        return 1;
    }
    return 0;
}
And it always shows that Gang doesn't exist.. :\


Re: Problem with Dini - ruarai - 07.08.2009

does the gang even exist?


Re: Problem with Dini - SiJ - 07.08.2009

Quote:
Originally Posted by яυαяαι
does the gang even exist?
Yes, and all other commands related to gang works, except this...


Re: [HELP] Problem with Dini - SiJ - 07.08.2009

*Bump*