20.10.2010, 05:54
Can you tell me what is the problem with my request command? Because when i request different ids, it sill says that i am requesting SAPD.
Example:
/request 1. Will show that i am requesting SAPD
/request 2. Should show that i am requesting SAH but is shows that i am requesting SAPD.
Example:
/request 1. Will show that i am requesting SAPD
/request 2. Should show that i am requesting SAH but is shows that i am requesting SAPD.
pawn Код:
COMMAND:request(playerid, params[])
{
new id;
if(sscanf(params,"u", id))return SendClientMessage(playerid, 0xFF0000AA, "Usage: /request [orgid]");
new string[MAX_PLAYERS],Name[MAX_PLAYERS];
GetPlayerName(playerid, Name, sizeof(Name));
if(IsInOrg[playerid] == 1) return SendClientMessage(playerid, red," You are already in a organisation!");
if(IsRequesting[playerid] == 1) return SendClientMessage(playerid, red," You are already requesting to join an organisation!");
format(string,255,"* %s is requesting to join San Andreas Police Dept.",Name);
SendClientMessageToAll(0xFFFFFFFF,string);
request[playerid] = 1;
IsRequesting[playerid] = 1;
{
if(IsInOrg[playerid] == 1) return SendClientMessage(playerid, red," You are already in a organisation!");
if(IsRequesting[playerid] == 1) return SendClientMessage(playerid, red," You are already requesting to join an organisation!");
format(string,255,"* %s is requesting to join San Andreas Street Racers.",Name);
SendClientMessageToAll(0xFFFFFFFF,string);
request[playerid] = 1;
IsRequesting[playerid] = 1;
}
return 1;
}
}