People requesting to join an org
#3

pawn Код:
COMMAND:request(playerid, params[])
{
    new id;
    new String[MAX_PLAYERS];
    if(sscanf(params,"i", id))return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /request [orgid]");
    GetPlayerName(playerid, pName, sizeof(pName));
    GetPlayerName(playerid, Name, sizeof(Name));
    if(PlayerInfo[playerid][IsInOrg] == 1) return SendClientMessage(playerid, red, "You are already in a organization!");
    if(PlayerInfo[playerid][IsRequesting] == 1) return SendClientMessage(playerid, red," You are already requesting to join an organization!");
    if(PlayerInfo[playerid][Leader] == id || PlayerInfo[playerid][Member] == id) return SCM(playerid, COLOR_GREY, "Your already in this organization");

    if(id == 1)
    {
    format(String,MAX_PLAYERS,"* %s is requesting to join San Andreas Police Department.",Name);
    SendClientMessageToAll(COLOR_ORANGE,String);
    format(File,sizeof(File),AccountLocation, pName);
    {
    dini_IntSet(File, "Request",PlayerInfo[playerid][request] = 1);
    dini_IntSet(File, "Isrequesting",PlayerInfo[playerid][IsRequesting] = 1);
    return 1;
    }
    }
    if(id == 2)
    {
    format(String,MAX_PLAYERS,"* %s is requesting to join National Guard.",Name);
    SendClientMessageToAll(COLOR_ORANGE,String);
    format(File,sizeof(File),AccountLocation, pName);
    {
    dini_IntSet(File, "Request",PlayerInfo[playerid][request] = 2);
    dini_IntSet(File, "Isrequesting",PlayerInfo[playerid][IsRequesting] = 1);
    return 1;
    }
    }
    if(id == 3)
    {
    format(String,MAX_PLAYERS,"* %s is requesting to join San Andreas Fire Department.",Name);
    SendClientMessageToAll(COLOR_ORANGE,String);
    format(File,sizeof(File),AccountLocation, pName);
    {
    dini_IntSet(File, "Request",PlayerInfo[playerid][request] = 3);
    dini_IntSet(File, "Isrequesting",PlayerInfo[playerid][IsRequesting] = 1);
    return 1;
    }
    }
    if(id == 4)
    {
    format(String,MAX_PLAYERS,"* %s is requesting to join The Sons Of Anarchy.",Name);
    SendClientMessageToAll(COLOR_ORANGE,String);
    format(File,sizeof(File),AccountLocation, pName);
    {
    dini_IntSet(File, "Request",PlayerInfo[playerid][request] = 4);
    dini_IntSet(File, "Isrequesting",PlayerInfo[playerid][IsRequesting] = 1);
    return 1;
    }
    }
    if(id == 5)
    {
    format(String,MAX_PLAYERS,"* %s is requesting to join The Grove Street Families.",Name);
    SendClientMessageToAll(COLOR_ORANGE,String);
    format(File,sizeof(File),AccountLocation, pName);
    {
    dini_IntSet(File, "Request",PlayerInfo[playerid][request] = 5);
    dini_IntSet(File, "Isrequesting",PlayerInfo[playerid][IsRequesting] = 1);
    return 1;
    }
    }
    return 1;
}
There you go Sorry about indentation... quiick reply didn't put it in automatically!
Reply


Messages In This Thread
People requesting to join an org - by LiamM - 28.11.2011, 19:14
Re: People requesting to join an org - by IceCube! - 28.11.2011, 19:16
Re: People requesting to join an org - by LiamM - 28.11.2011, 19:30
Re: People requesting to join an org - by IceCube! - 28.11.2011, 19:34
Re: People requesting to join an org - by LiamM - 01.12.2011, 15:22
Re: People requesting to join an org - by park4bmx - 01.12.2011, 15:28

Forum Jump:


Users browsing this thread: 1 Guest(s)