uhh need help with gate pw...
#1

Need help with this cmd .. I is changing all gates pws not ones... could I ask for help..

I think something about looping..
pawn Код:
CMD:admingatepw(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pShopTech] == 1)
    {
        new string[128], gateid, pass[24];
        if(sscanf(params, "ds[24]", gateid, pass)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /admingatepw [gateid] [pass]");

        if(strlen(pass) > 24)
        {
            SendClientMessageEx(playerid, COLOR_GRAD2, " Must be 24 characters or less! ");
            return 1;
        }
        format(string, sizeof(string), "Gate Password for gate %d changed to %s", gateid, pass);
        format(GateInfo[gateid][gPass], 24, "%s", pass);
        SendClientMessageEx(playerid, COLOR_GRAD2, string);
        SaveGates();
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
uhh need help with gate pw... - by Scrillex - 27.10.2013, 17:25
Re: uhh need help with gate pw... - by Patrick - 27.10.2013, 17:31
Re: uhh need help with gate pw... - by Scrillex - 27.10.2013, 17:53
Re: uhh need help with gate pw... - by knackworst - 27.10.2013, 17:57
Re: uhh need help with gate pw... - by Scrillex - 27.10.2013, 18:02

Forum Jump:


Users browsing this thread: 4 Guest(s)