uhh need help with gate pw...
#2

This should work, you don't need to format to assign a variable, you could simply use the code like my one, you might notice that I also used Multiple Actions to shorten the code.

pawn Код:
CMD:admingatepw(playerid, params[])
{
   
    new
        string[128], gateid, pass[24];

    if(sscanf(params, "ds[24]", gateid, pass))
        return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /admingatepw [gateid] [pass]");

    if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pShopTech] != 1)
        return SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");

    if(strlen(pass) > 24)  
        return SendClientMessageEx(playerid, COLOR_GRAD2, " Must be 24 characters or less! ");
       
    format(string, sizeof(string), "Gate Password for gate %d changed to %s", gateid, pass), SendClientMessageEx(playerid, COLOR_GRAD2, string);
    GateInfo[gateid][gPass] = pass, SaveGates();
    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: 3 Guest(s)