[POMOC ]Komande /makeadmin /makemaster /makeleader

Započeo eldarek22, Decembar 26, 2011, 20:47:54 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

eldarek22


Skripta koju koristim:Svoju RP
Detaljan opis problema:trebaju mi kodovi za komande /makeadmin /makemaster  i /makeleader
Dio skripte:Pawno
Neke slike/video za lakse dobivanje pomoci(neobavezno)

[if(strcmp(cmd, "/makeadmin", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koristite: /makeadmin [playerid/PartOfName] [level(1-3)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pAdmin] = level;
printf("AdmCmd: %s je postavio %s na level %d admina.", sendername, giveplayer, level);
format(string, sizeof(string), "   Promovisani ste na level %d admina od strane %s", level, sendername);
SendClientMessage(para1, COLOR_WHITE, string);
format(string, sizeof(string), "   Promovisali ste %s na level %d admina.", giveplayer,level);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Niste autorizovani da bi ste Koristiteli ovu komandu!");
}
}
return 1;
}/code]



[code]if(strcmp(cmd, "/makemaster", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koristite: /makemaster [playerid/PartOfName] [level(1-4)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 4 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "   Ne moze manje od 0, ili vise od 4!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pGameMaster] = level;
printf("AdmCmd: %s je dao %s level %d GameMaster-a.", sendername, giveplayer, level);
format(string, sizeof(string), "   Vi ste postavljeni za level %d GameMaster-a od strane %s", level, sendername);
SendClientMessage(para1, COLOR_WHITE, string);
format(string, sizeof(string), "   Vi ste postavili %s level %d GameMaster-a.", giveplayer,level);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Niste autorizovani da bi ste Koristiteli ovu komandu!");
}
}
return 1;
}






if(strcmp(cmd, "/makeleader", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koristite: /makeleader [playerid/PartOfName] [Number(1-15)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 16 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "   Ne idite ispod 0, ili iznad 15!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 4)
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
            if(PlayerInfo[para1][pMember] > 0 || PlayerInfo[para1][pFMember] < 255)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Taj igrac je u Faction / Family !");
                return 1;
            }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "   Vi ste postavljeni za lidera od Administratora %s", sendername);
SendClientMessage(para1, COLOR_WHITE, string);
format(string, sizeof(string), "   Vi ste dali %s broj organizacije %d.", giveplayer,level);
SendClientMessage(playerid, COLOR_WHITE, string);
if(level == 0) { PlayerInfo[para1][pChar] = 0; PlayerInfo[para1][pRank] = 0; gTeam[para1] = 3; PlayerInfo[para1][pTeam] = 0; return 1; }
else if(level == 1) { PlayerInfo[para1][pChar] = 288; } //Police Force
else if(level == 2) { PlayerInfo[para1][pChar] = 286; } //FBI/ATF
else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //National Guard
else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //Fire/Ambulance
else if(level == 5) { PlayerInfo[para1][pChar] = 116; } //Surenos
else if(level == 6) { PlayerInfo[para1][pChar] = 125; } //La Cosa Nostra
else if(level == 7) { PlayerInfo[para1][pChar] = 147; } //Mayor
else if(level == 8) { PlayerInfo[para1][pChar] = 249; } //Hitmans
else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //RTS Studio
else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi Cab Company
else if(level == 11) { PlayerInfo[para1][pChar] = 124; } //LCN
else if(level == 12) { PlayerInfo[para1][pChar] = 294; } //Yamaguchi
else if(level == 13) { PlayerInfo[para1][pChar] = 28; } //Ballas
else if(level == 14) { PlayerInfo[para1][pChar] = 108; } //Ms 13 Mara Salvatrucha
else if(level == 15) { PlayerInfo[para1][pChar] = 293; } //GroveStreet Families
else if(level == 16) { PlayerInfo[para1][pChar] = 16; } //Parking Servis

if(level == 0)
{
    gTeam[para1] = 3;
    PlayerInfo[para1][pTeam] = 3;
}
else if(level == 1 || level == 2 || level == 3)
{
    gTeam[para1] = 2;
    PlayerInfo[para1][pTeam] = 2;
}
else if(level == 4)
{
    gTeam[para1] = 1;
    PlayerInfo[para1][pTeam] = 1;
}
else
{
    gTeam[para1] = 15;
    PlayerInfo[para1][pTeam] = 15;
}

    SetPlayerSkin(para1, PlayerInfo[para1][pChar]);

    if(level == 0)
    {
        PlayerInfo[para1][pRank] = 0;
    }
    else
    {
    PlayerInfo[para1][pRank] = 6;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Niste autorizovani da bi ste Koristiteli ovu komandu!");
}
}
return 1;
}
[/code]

eldarek22

e a kamo ide to......po koje ? ono on public tako nesto ili ?

Citat: eldarek22 poslato Decembar 26, 2011, 22:36:36 POSLE PODNE
e a kamo ide to......po koje ? ono on public tako nesto ili ?
Ne mora ovo nista da znaci sto ti je dao...Sigurno ti pod /makeleader redni brojevi ne idu ovako !A sto se tice /makeadmin i /makemaster ,mozda ti nisu definisani kao pAdmin,pGameMaster ;)