09.11.2010, 13:20
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
Ferrari, Thxbb
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