What's new

Denied /fire hmm...

Status
Not open for further replies.

Skypo

Silver Member
Joined
Jan 6, 2010
Messages
1,487
Location
Rotterdam, Netherlands
Every faction members knows what /fire means.. BUT. The fucked up thing for faction leaders is.. When they want to fire someone.. He/she has to be online?! W00T?! Why?! What if the person is inactive? I cant fire him/her.. What if the person abuses their power and quickly goes off to get on when im off? I can fire him/her. So.. Why don't we make /fire availible at all time.?
 

Hopkins

Silver Member
Joined
Jan 6, 2010
Messages
958
Was going to suggest this ages ago back when I ran the news. Mega support up in this.
 

tomanderson

something like this

Code:
dcmd(sqlfire,7,cmdtext);
...

Code:
dcmd_sqlfire(playerid, params[]) // jeff
{
   new firedplayer[64];
   firedplayer = strtok(params, index);
   if(!strlen(firedplayer))
    {
      SendClientMessage(playerid,COLOR_GRAD1,"USAGE: /fire [full name]");
         return 1;
     }
     //store the firedplayer's sqlid
   new sql[256];
   format(sql, sizeof(sql), "SELECT id FROM players WHERE Name='%s'", firedplayer);
   samp_mysql_query(sql);
   samp_mysql_store_result();
   if (samp_mysql_num_rows() == 0)
    {
         SendClientMessage(playerid, COLOR_GRAD1, "Invalid player name.");
         return 1;
    }
    samp_mysql_fetch_row(row);
   new sqlid = strval(row);
   samp_mysql_free_result();

   //set the firedplayer's member to 0
   MySQLUpdatePlayerStr(query, PlayerInfo[firedplayer][pSQLID], "Member", 0);
    MySQLUpdateFinish(query, PlayerInfo[firedplayer][pSQLID]);
    
    //tell the player he's fired
   format(string, 256, "You have fired %s from your faction.", firedplayer);
   SendClientMessage(playerid, COLOR_YELLOW,string,1);
    return 1;
}
 

Skypo

Silver Member
Joined
Jan 6, 2010
Messages
1,487
Location
Rotterdam, Netherlands
tomanderson said:
something like this

Code:
dcmd(sqlfire,7,cmdtext);
...

Code:
dcmd_sqlfire(playerid, params[]) // jeff
{
   new firedplayer[64];
   firedplayer = strtok(params, index);
   if(!strlen(firedplayer))
    {
      SendClientMessage(playerid,COLOR_GRAD1,"USAGE: /fire [full name]");
         return 1;
     }
     //store the firedplayer's sqlid
   new sql[256];
   format(sql, sizeof(sql), "SELECT id FROM players WHERE Name='%s'", firedplayer);
   samp_mysql_query(sql);
   samp_mysql_store_result();
   if (samp_mysql_num_rows() == 0)
    {
         SendClientMessage(playerid, COLOR_GRAD1, "Invalid player name.");
         return 1;
    }
    samp_mysql_fetch_row(row);
   new sqlid = strval(row);
   samp_mysql_free_result();

   //set the firedplayer's member to 0
   MySQLUpdatePlayerStr(query, PlayerInfo[firedplayer][pSQLID], "Member", 0);
    MySQLUpdateFinish(query, PlayerInfo[firedplayer][pSQLID]);
    
    //tell the player he's fired
   format(string, 256, "You have fired %s from your faction.", firedplayer);
   SendClientMessage(playerid, COLOR_YELLOW,string,1);
    return 1;
}
Showoff..
 
Status
Not open for further replies.
Top