[Pomoc] /makeadmin

Započeo Borekâ„¢, Februar 16, 2012, 20:59:42 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Moja DM skripta.
Detaljan opis problema: Pa kada upisem /makeadmin 0 1338 nece mi postavit admina,tako i jos par komandi. Izbaci mi: invalid player id,koda je zbugana komanda,isto tako mi se dogada sa /setskin i /Sethp... :/

Dio skripte:CMD:makeadmin(playerid, params[])
{
    new pID, value;
    if(PlayerInfo[playerid][AdminLevel] < 1338) return SendClientMessage(playerid, COLOR_RED, "You are not authorized to use this command.");
    else if (sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /makeadmin [playerid/partofname] [level 1-1338].");
    else if (value < 0 || value > 1338) return SendClientMessage(playerid, COLOR_RED, "Unknown level! Only 0 to 1338.");
    else if(pID == INVALID_PLAYER_ID) return SCM(playerid, COLOR_RED,"Invalid player id.");
    else {
        new pName[MAX_PLAYER_NAME], tName[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        GetPlayerName(pID, tName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "You have promoted %s to Admin level %i", tName, value);
        SCM(playerid, COLOR_GREEN, string);
        format(string, sizeof(string), "You have been promoted to Admin level %i by %s", value, pName);
        SCM(pID, COLOR_GREEN, string);
        PlayerInfo[pID][AdminLevel] = value;
    }
    return 1;
}


Neke slike/video za lakse dobivanje pomoci(neobavezno):
http://www.zaslike.com/viewer.php?file=lvuwmimo15qu4zzfidx.jpg

Tex

Ako je verzija moda bila 0.3c a prebacio si na 0.3d,pokusaj skinuti nove plugine..to je meni radilo na Noxdusu..I kad sam ubacio nove plugine radilo je kako treba..

Citat: Tex poslato Februar 17, 2012, 21:06:20 POSLE PODNE
Ako je verzija moda bila 0.3c a prebacio si na 0.3d,pokusaj skinuti nove plugine..to je meni radilo na Noxdusu..I kad sam ubacio nove plugine radilo je kako treba..

Evo stavio sam nove plugine i opet isto,jednostavno valjda neda da se postavi igracu koji je ID 0.. -.-

Jesi li skinuo najnoviju verziju sscanfa?

vlado_plavsic

CMD:makeadmin(playerid, params[])
{
    new pID, value,pName[MAX_PLAYER_NAME], tName[MAX_PLAYER_NAME], string[128];
    if(PlayerInfo[playerid][AdminLevel] < 1338) return SendClientMessage(playerid, COLOR_RED, "You are not authorized to use this command.");
    else if (sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /makeadmin [playerid/partofname] [level 1-1338].");
    else if(pID == INVALID_PLAYER_ID) return SCM(playerid, COLOR_RED,"Invalid player id.");
    else if (value < 0 || value > 1338) return SendClientMessage(playerid, COLOR_RED, "Unknown level! Only 0 to 1338.");
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    GetPlayerName(pID, tName, MAX_PLAYER_NAME);
    format(string, sizeof(string), "You have promoted %s to Admin level %i", tName, value);
    SCM(playerid, COLOR_GREEN, string);
    format(string, sizeof(string), "You have been promoted to Admin level %i by %s", value, pName);
    SCM(pID, COLOR_GREEN, string);
    PlayerInfo[pID][AdminLevel] = value;
    return 1;
}


btw Malko sam je preuredio da bude urednija?
Poslednja Izmena: Februar 18, 2012, 01:12:19 PRE PODNE od Vlado_Plavsic aka Plavsa