Problem with command (mysql)
#1

Hello Guys, im having some trouble with a faction related command (/makeleader) everytime i use this command the server restarts -__- . But on my localhost everything works fine, no server shutdowns or server restarts. Can any of you guys help me.

pawn Код:
CMD:makeleader(playerid, params[])
{
    new id, faction;
    if (PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, RED, "ERROR : {FFFFFF}You are not authorized to use this command!");
    else if (sscanf(params, "ud", id, faction)) return SendClientMessage(playerid, RED, "USAGE : {FFFFFF}/makeleader [id] [factionid]");
    else if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED, "ERROR : {FFFFFF}This player does not exist");
    else if (faction > 1) return SendClientMessage(playerid, RED, "ERROR : {FFFFFF}Invalid Faction ID");
    new ftext[30];
    if (faction == 1)
    {
        ftext = "LSPD";
    }
    PlayerInfo[id][pLeader] = faction;
    PlayerInfo[id][pRank] = 6;
    PlayerInfo[id][pFaction] = faction;
    new string[128];
    format(string, sizeof(string), "You have been made the leader of the %s by Admin %s.",ftext, GetName(playerid));
    SendClientMessage(id, COLOR_ROBBERY, string);
    format(string, sizeof(string), "%s have made %s the leader of the %s.", GetName(playerid), GetName(id), ftext);
    Log("logs/faction.log", string);
    format(string, sizeof(string), "You have made %s the leader of the %s.", GetName(id),ftext);
    SendClientMessage(playerid, COLOR_ROBBERY, string);
    PlayerInfo[id][pGang] = 255;
   
    return 1;
}
Reply
#2

Deleted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)