/makeleader command, need help
#10

pawn Код:
if(sscanf(params, "is[24]", targetid))
The sscanf specifiers you are using do not match the command you are making.
If you want the command layout like.
Код:
/makeleader [playerid/PartOfName]
Then use the u specifier.

pawn Код:
COMMAND:makeleader(playerid, params[])
{
    if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]: You are not authorized to use this command ");
    new targetid;
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_SYNTAX, "[SYNTAX]: /makeleader [PlayerID/PartOfName]");
    if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid,WHITE,"[ERROR] Player Is Not Connected");
    else
    {
        SendClientMessage(targetid,COLOR_GREEN, "You have been made a faction leader!");
        FactionLeader[targetid] += 1;
    }
    return 1;
}
You also included two variables for no reason when you only needed one.
Reply


Messages In This Thread
/makeleader command, need help - by Mike97300 - 13.06.2012, 20:14
Re: /makeleader command, need help - by JhnzRep - 13.06.2012, 20:32
Re: /makeleader command, need help - by Burn_ - 13.06.2012, 20:34
Re: /makeleader command, need help - by JhnzRep - 13.06.2012, 20:35
Re: /makeleader command, need help - by Mike97300 - 13.06.2012, 20:35
Re: /makeleader command, need help - by JhnzRep - 13.06.2012, 20:38
Re: /makeleader command, need help - by Mike97300 - 13.06.2012, 20:42
Re: /makeleader command, need help - by JhnzRep - 13.06.2012, 20:45
Re: /makeleader command, need help - by Mike97300 - 13.06.2012, 20:47
Re: /makeleader command, need help - by ReneG - 13.06.2012, 22:52

Forum Jump:


Users browsing this thread: 4 Guest(s)