Bunnyhop command help needed
#1

pawn Код:
CMD:bhstop(playerid, params[])
{
    new giveplayer;
    if(!sscanf(params, "i", giveplayer, "Myusername", true)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You need to be **!");
    if(sscanf(params, "i", giveplayer, "Myusername", true))
    {
        bhstop[playerid] = 1;
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "[ADMIN]: You have stopped the Bunnyhopper!");
    }
    return 1;
}
That should only work for username "Myusername" right?
Reply
#2

I don't know why you're using an integer value in sscanf in the first place 0_o.

pawn Код:
CMD:bhstop(playerid, params[])
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    if(strcmp(name, "Myusername", false) != 0) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You need to be **!");
    bhstop[playerid] = 1;
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "[ADMIN]: You have stopped the Bunnyhopper!");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)