Help with these commands?
#8

Quote:
Originally Posted by Rockk
Посмотреть сообщение
Код:
request[id] == 1
This should be "true" or "false" as the example i've given you, not 1 or 0.
And you are using a different variable, I used "Requested" not request.

EDIT:
Didn't see that "else" there, it should be return.
pawn Код:
CMD:setmember(playerid, params[])
{
    new id;
    if(gsfmember[playerid] < 2) return SendClientMessage(playerid, 0xFF000000, "You cannot use this command");
    if(sscanf(params,"u", id)) return SendClientMessage(playerid, 0xFFFFFF00, "USAGE:/setmember [id]");
    if(Requested[id] == false) return SendClientMessage(playerid, 0xFF000000, "This player is not requesting to join your organization!");
    {
        SendClientMessage(id, 0x99FF0000, "~You have been made a member of Grove Street Families~");
        SendClientMessage(playerid, 0x99FF0000, "Member have been set!");
        gsfmember[id] = 1;
    }
    return 1;
}
Thank you. But why does this command send both of the messages to myself and sets myself leader?

pawn Код:
CMD:setleader(playerid, params[])
{
    new id;
    if(admin[playerid] < 3) return SendClientMessage(playerid, 0xFF000000, "Your not an admin with right lvl.");
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 2512.8247,-1664.4379,13.5784)) return SendClientMessage(playerid, 0xFF000000, "Go to the HQ you want to set the leader.");
    if(sscanf(params,"u", id)) return SendClientMessage(playerid, 0xFFFFFF00, "USAGE:/setleader [id]");
    format(outp,sizeof(outp),"%s gave you the leadership of Grove Street Families!",PlayerName(playerid));
    SendClientMessage(id, 0xd0d18100,outp);
    format(outp,sizeof(outp),"You sat %s as leader of Grove Street Families!",PlayerName(id));
    SendClientMessage(playerid, 0xd0d18100,outp);
    gsfmember[id] = 2;
    return 1;
}
Reply


Messages In This Thread
Help with these commands? - by Qaiis - 09.03.2013, 21:38
Re: Help with these commands? - by Rock - 09.03.2013, 21:42
Re: Help with these commands? - by Qaiis - 09.03.2013, 21:46
Re: Help with these commands? - by Rock - 09.03.2013, 22:07
Re: Help with these commands? - by Qaiis - 09.03.2013, 22:17
Re: Help with these commands? - by Rock - 09.03.2013, 22:29
AW: Help with these commands? - by morocco - 09.03.2013, 23:54
Re: Help with these commands? - by Qaiis - 10.03.2013, 10:31
Re: Help with these commands? - by Sandiel - 10.03.2013, 10:34

Forum Jump:


Users browsing this thread: 6 Guest(s)