27.10.2013, 17:31
(
Последний раз редактировалось Patrick; 27.10.2013 в 18:59.
)
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;
}