13.09.2013, 20:50
Код:
PlayerInfo[playerid][pAdmin] = 1;
/setadmin [ID] [LEVELADMIN]
obs:rodei bastante e nгo achei nгo sei se procurei bem antes de falarem qualquer coisa...
PlayerInfo[playerid][pAdmin] = 1;
PlayerInfo[playerid][pAdmin] == 1 || IsPlayerAdmin(playerid)
CMD:setadmin( playerid, params[ ] )
{
if(IsPlayerAdmin(playerid))
{
if(sscanf(params, "ud", params[0], params[1])) return SendClientMessage(playerid, -1, " use; /setadmin id level ");
PlayerInfo[params[0]][pAdmin] = params[1];
}
return 1;
}
if(strcmp(cmdtext, "/setadmin", true) == 0)
{
new plid, level;
if(IsPlayerAdmin(playerid))
{
if(sscanf(params, "ud", plid, level)) return SendClientMessage(playerid, -1, " use; /setadmin id level ");
PlayerInfo[plid][pAdmin] = level;
}
return 1;
}
PlayerInfo[playerid][pAdmin] == 1 || IsPlayerAdmin(playerid)
C:\Users\Hugo\Downloads\Server gta\samp03x_svr_R1-2_win32\gamemodes\AkD.pwn(538) : error: 017: undefined symbol "params"
if(PlayerInfo[playerid][pAdmin] == 1 || IsPlayerAdmin(playerid) return SendClientMessage(playerid, -1, "Vocк nгo й Administrador.");
{
//Funзгo
}
return 1;
e deu esse erro
Код:
C:\Users\Hugo\Downloads\Server gta\samp03x_svr_R1-2_win32\gamemodes\AkD.pwn(538) : error: 017: undefined symbol "params" |
if(strcmp(cmdtext, "/setadmin", true) == 0)
{
new plid, level;
if(IsPlayerAdmin(playerid))
{
if(sscanf(cmdtext, "s[10]ud", cmd, plid, level)) return SendClientMessage(playerid, -1, " use; /setadmin id level ");
PlayerInfo[plid][pAdmin] = level;
}
return 1;
}
PT esclare-me uma duvida, porque usaste s[1] antes do ud? , eu sei o que й o ud
|
c - A character. d, i - An integer. h, x - A hex number (e.g. a colour). f - A float. s - A string. z - An optional string. pX - An additional delimiter where X is another character. '' - Encloses a litteral string to locate. u - User, takes a name, part of a name or an id and returns the id if they're connected. |