save gangs
#1

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?
Reply
#2

help plz, i really need it
Reply
#3

bump
Reply
#4

up i want this command
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)