SA-MP Forums Archive
save gangs - 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: save gangs (/showthread.php?tid=81805)



save gangs - Ribber - 14.06.2009

Hi
ok i have this at save gangs:


pawn Код:
//Create Gang//
    if(gangcmd==1)
    {
    if(playerGang[playerid]>0)
     {
    SendClientMessage(playerid, 0x83BFBFFF, "You are already in a gang!");
    return 1;
    }
    for(new i = 1; i < MAX_GANGS; i++)
    {
    if(gangInfo[i][0]==0) {
    //name gang
    format(gangNames[i], MAX_GANG_NAME, "%s", tmp);
    //Gang exists
    gangInfo[i][0]=1;
    //There is one member
    gangInfo[i][1]=1;
    //Gang color is player's color
    gangInfo[i][2]=playerColors[playerid];
    //Player is the first gang member
    gangMembers[i][0] = playerid;
    format(string, sizeof(string),"You have created the gang '%s' (id: %d)", gangNames[i], i);
    SendClientMessage(playerid, 0x83BFBFFF, string);
    playerGang[playerid]=i;



    //--------SAVEGANG----------------------------------------
    new player[MAX_PLAYERS];
    GetPlayerName(playerid,player,sizeof(player));
    new File:GangFile;
    format(string, sizeof(string), "%s_Gang", player);                     <---------- This
    GangFile = fopen(string, io_append);
    new var[32];
    format(var, 32, "Gang: %s, %d \r\n",gangNames[i],gangInfo[i][0]=1);
    fwrite(GangFile, var);
    fclose(GangFile);
    //-------SAVEGANG-------------------------------------------



    return 1;
    }
    }
    return 1;
    }
how can i load this now from the file after the server restarts?


Re: save gangs - Ribber - 14.06.2009

help plz, i really need it


Re: save gangs - Ribber - 15.06.2009

bump


Re: save gangs - CaLaP - 25.08.2009

up i want this command