More org help need.
#3

Give this a try (havnt tested need your functions) hope it works
pawn Код:
COMMAND:request(playerid, params[])
{
    new id;
    if(sscanf(params,"d", id))return SendClientMessage(playerid, 0xFF0000AA, "Usage: /request [orgid]");
    new string[128],Name[MAX_PLAYER_NAME];
    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!");
    if(id == 1)
    {
        format(string,128,"* %s is requesting to join San Andreas Police Dept.",Name);
        SendClientMessageToAll(0xFFFFFFFF,string);
        request[playerid] = 1;
        IsRequesting[playerid] = 1;
        return 1;
    }
    if(id == 2)
    {
        format(string,128,"* %s is requesting to join San Andreas Street Racers.",Name);
        SendClientMessageToAll(0xFFFFFFFF,string);
        request[playerid] = 1;
        IsRequesting[playerid] = 1;
    }
    return 1;
}
Advice: Use the correct size arrays for strings/names. In sscanf the 'u' specifier is for names so use 'd' if its an integer value.
Reply


Messages In This Thread
More org help need. - by zack3021 - 20.10.2010, 05:54
Re: More org help need. - by zack3021 - 20.10.2010, 06:41
Re: More org help need. - by iggy1 - 20.10.2010, 07:06
Re: More org help need. - by zack3021 - 20.10.2010, 07:13

Forum Jump:


Users browsing this thread: 2 Guest(s)