What's problem with this?
#1

The problem isn't error or anything when he request to join any org racers/hitman/army when i /accept it accept him in Police dept so can someone help ?

Please respond

pawn Код:
COMMAND:accept(playerid, params[])
{
    new id,Name[MAX_PLAYER_NAME],string[128];
    if(IsPlayerConnected(id))
    if(Leader[playerid])
    { //LVPD Leader Cmd Start Here
    if(sscanf(params,"u", id))return SendClientMessage(playerid, 0xFF0000AA, "Usage: /accept [id]");
    GetPlayerName(playerid, Name, sizeof(Name));
    if(IsInOrg[id] == 1) return SendClientMessage(playerid,red,"This user is already in an organization!");
    if(IsRequesting[id] == 0) return SendClientMessage(playerid,red,"Ths user is not requesting to your organization!");
    else if(Leader[playerid] == 1 && Member[id] == 0 || OrgId[playerid] == 1 || IsRequesting[id] == 1 || id == 1)
    {
    format(string, sizeof(string), "%s has accepted your application into San Andreas Police Dept.",Name);
    SendClientMessage(id,green, string);
    Leader[id] = 0;
    IsInOrg[id] = 1;
    IsLaw[id] = 1;
    Member[id] = 1;
    IsRequesting[id] = 0;
    SetPlayerSkin(id, 280);
    GivePlayerWeapon(id,24,500);
    GivePlayerWeapon(id,3,-1);
    GivePlayerWeapon(id,31,5000);
    SetPlayerColor(id,SAPD_COLOR);
    new playername[24];
    GetPlayerName(id, playername, 24);
    format(file,sizeof(file),"/OrgUsers/%s.ini", playername);
    if(!dini_Exists(file))
        {
        dini_Create(file);
        dini_IntSet(file, "Leader",Leader[id] = 0);
        dini_IntSet(file, "Member",Member[id] = 1);
        dini_IntSet(file, "Status",IsInOrg[id] = 1);
        dini_IntSet(file, "OrgId",OrgId[id] = 1);
        dini_IntSet(file, "Request",request[id] = 0);
        dini_IntSet(file, "Isrequesting",IsRequesting[id] = 0);
        dini_Set(file, "SAPDMember",playername);
        }
    format(string, sizeof(string), "You have set a player member of San Andreas Police Dept.",Name);
    SendClientMessage(playerid,green, string);
    }
    if(IsInOrg[id] == 1) return SendClientMessage(playerid,red,"This user is already in an organization!");
    if(IsRequesting[id] == 0) return SendClientMessage(playerid,red,"Ths user is not requesting to your organization");
    else if(Leader[playerid] == 1 || Member[id] == 0 || OrgId[playerid] == 2 || IsRequesting[id] == 1 || id == 2)
    {
    format(string, sizeof(string), "%s has accepted your application into San Andreas Racers.",Name);
    SendClientMessage(id,green, string);
    Leader[id] = 0;
    IsInOrg[id] = 1;
    Member[id] = 2;
    IsRequesting[id] = 0;
    SetPlayerSkin(id, 28);
    GivePlayerWeapon(id,22,500);
    GivePlayerWeapon(id,32,5000);
    SetPlayerColor(id,COLOR_LIGHTGREEN);
    new playername[24];
    GetPlayerName(id, playername, 24);
    format(file,sizeof(file),"/OrgUsers/%s.ini", playername);
    if(!dini_Exists(file))
        {
        dini_Create(file);
        dini_IntSet(file, "Leader",Leader[id] = 0);
        dini_IntSet(file, "Member",Member[id] = 2);
        dini_IntSet(file, "Status",IsInOrg[id] = 1);
        dini_IntSet(file, "OrgId",OrgId[id] = 2);
        dini_IntSet(file, "Request",request[id] = 0);
        dini_IntSet(file, "Isrequesting",IsRequesting[id] = 0);
        dini_Set(file, "SASRMember",playername);
        }
    format(string, sizeof(string), "You have set a player member of San Andreas Racers.",Name);
    SendClientMessage(playerid,green, string);
    }
    }
    else if(Leader[playerid] == 1 || Member[id] == 0 || OrgId[playerid] == 3 || IsRequesting[id] == 1 || id == 3)
    {
    format(string, sizeof(string), "%s has accepted your application into San Andreas Armed Force.",Name);
    SendClientMessage(id,green, string);
    Leader[id] = 0;
    IsInOrg[id] = 1;
    Member[id] = 3;
    IsRequesting[id] = 0;
    SetPlayerSkin(id, 287);
    GivePlayerWeapon(id,31,10000);
    GivePlayerWeapon(id,34,10000);
    SetPlayerColor(id,SAAF_COLOR);
    new playername[24];
    GetPlayerName(id, playername, 24);
    format(file,sizeof(file),"/OrgUsers/%s.ini", playername);
    if(!dini_Exists(file))
        {
        dini_Create(file);
        dini_IntSet(file, "Leader",Leader[id] = 0);
        dini_IntSet(file, "Member",Member[id] = 3);
        dini_IntSet(file, "Status",IsInOrg[id] = 1);
        dini_IntSet(file, "OrgId",OrgId[id] = 3);
        dini_IntSet(file, "Request",request[id] = 0);
        dini_IntSet(file, "Isrequesting",IsRequesting[id] = 0);
        dini_Set(file, "SASRMember",playername);
        }
    format(string, sizeof(string), "You have set a player member of San Andreas Armed Force.",Name);
    SendClientMessage(playerid,green, string);
    }
    else if(Leader[playerid] == 1 || Member[id] == 0 || OrgId[playerid] == 4 || IsRequesting[id] == 1 || id == 4)
    {
    format(string, sizeof(string), "%s has accepted your application into Private Detective & Hitman Union.",Name);
    SendClientMessage(id,green, string);
    Leader[id] = 0;
    IsInOrg[id] = 1;
    Member[id] = 4;
    IsRequesting[id] = 0;
    SetPlayerSkin(id, 163);
    GivePlayerWeapon(id,31,10000);
    GivePlayerWeapon(id,34,10000);
    SetPlayerColor(id,PDHU_COLOR);
    new playername[24];
    GetPlayerName(id, playername, 24);
    format(file,sizeof(file),"/OrgUsers/%s.ini", playername);
    if(!dini_Exists(file))
        {
        dini_Create(file);
        dini_IntSet(file, "Leader",Leader[id] = 0);
        dini_IntSet(file, "Member",Member[id] = 4);
        dini_IntSet(file, "Status",IsInOrg[id] = 1);
        dini_IntSet(file, "OrgId",OrgId[id] = 4);
        dini_IntSet(file, "Request",request[id] = 0);
        dini_IntSet(file, "Isrequesting",IsRequesting[id] = 0);
        dini_Set(file, "SASRMember",playername);
        }
    format(string, sizeof(string), "You have set a player member of Private Detective & Hitman Union.",Name);
    SendClientMessage(playerid,green, string);
    }
    return 1;
}

Ferrari, Thxbb
Reply
#2

dont get u xD
re explain plz
Reply
#3

hehhehe look when he /request to join an org
it accept him in another org lolzzzz
so i got 4 orgs
1 sapd
2 racers
3 army
4 hitmans
...
when someone request to racers and i /accept him in the org it accept him in another org which is sapd
when someone request to army and i /accept him in the org it accept him in naother org which is sapd
and so on with hitmans to

....
understood ?
Reply
#4

Could someone please respond? i need it fixed plz
Reply
#5

You did this:
pawn Код:
new id;
if(IsPlayerConnected(id))
{
//bla
Meaning, id is always 0, cause u didnt define it yet..
Reply
#6

Thx i hope it work i'll go now school and when am back i'll tell my friend to test it with me


thx for your respond
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)