[Pomoc] Nece da mi sprema

Započeo ♥ BMW ♥, Septembar 04, 2012, 21:50:36 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim: Moja od 0
Detaljan opis problema: Znaci radim svoju skriptu od 0 i kad napravim komandu /makeleader ono dadne lidera, ali kada odem relog nemam lidera :/
Dio skripte:
CMD:makeleader(playerid,params[])
{
new string[256];
new idx;
    new level;
new orgid;
new INI:File = INI_Open(UserPath(playerid));
    INI_WriteInt(File,"Lider",orgid);
    INI_Close(File);
new sendername[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
          new giveplayer[MAX_PLAYER_NAME];
    new tmp[256];
tmp = strtok(params, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /makeleader [ID Igraca/Dio Imena] [Broj(1-17)]");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
SendClientMessage(playerid, 0x33CCFFAA, "1.LSPD || 2. Slobodno || 3. Slobodno || 4. Slobodno ");
SendClientMessage(playerid, 0x33CCFFAA, "5.Slobodno || 6.Slobodno || 7.Slobodno || 8.Slobodno || 9.Slobodno || 10.Slobodno || 12.Slobodno");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
tmp = strtok(params, idx);
level = strval(tmp);
if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Nemojte ispod 0, ili preko 17!"); return 1; }
if(!IsPlayerAdmin(playerid))
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "* Postavljen si za lidera bande/mafije | Od strane Admina: {FFFFFF}%s", sendername);
SendClientMessage(para1, SVETLOPLAVA, string);
format(string, sizeof(string), "* Postavio si %s-a da vodi {FFFFFF}| %d.", giveplayer,level);
SendClientMessage(playerid, SVETLOPLAVA, 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; } //LS PD

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;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}| {FFFF9C}TempoBot {FFFFFF}| Niste ovlasteni da koristite tu komandu.");
}
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci.


Village's Roleplay USKORO...

Village's Roleplay USKORO...

Ovako bi trebalo da ti radi,stavio si gore da cuva ORGID,a nigde nisi definsao sta je uopste taj "orgid".

CMD:makeleader(playerid,params[])
{
new string[256];
new idx;
        new level;
new orgid;
new sendername[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
          new giveplayer[MAX_PLAYER_NAME];
    new tmp[256];
tmp = strtok(params, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /makeleader [ID Igraca/Dio Imena] [Broj(1-17)]");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
SendClientMessage(playerid, 0x33CCFFAA, "1.LSPD || 2. Slobodno || 3. Slobodno || 4. Slobodno ");
SendClientMessage(playerid, 0x33CCFFAA, "5.Slobodno || 6.Slobodno || 7.Slobodno || 8.Slobodno || 9.Slobodno || 10.Slobodno || 12.Slobodno");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
tmp = strtok(params, idx);
level = strval(tmp);
if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Nemojte ispod 0, ili preko 17!"); return 1; }
if(!IsPlayerAdmin(playerid))
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "* Postavljen si za lidera bande/mafije | Od strane Admina: {FFFFFF}%s", sendername);
SendClientMessage(para1, SVETLOPLAVA, string);
format(string, sizeof(string), "* Postavio si %s-a da vodi {FFFFFF}| %d.", giveplayer,level);
SendClientMessage(playerid, SVETLOPLAVA, 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; } //LS PD

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]);
                                            new INI:File = INI_Open(UserPath(playerid));
                                            INI_WriteInt(File,"Lider",level);
                                            INI_Close(File);
    if(level == 0)
    {
        PlayerInfo[para1][pRank] = 0;
    }
    else
    {
    PlayerInfo[para1][pRank] = 6;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}| {FFFF9C}TempoBot {FFFFFF}| Niste ovlasteni da koristite tu komandu.");
}
}
return 1;
}
Izvinjavam se na svim glupostima i ako sam nekome napisao nesto lose, neko drugi je koristio moj profil!
__________________________________________
https://bk.gta.world - GTA World Balkan - RAGEMP

Citat: ''KopriVa' poslato Septembar 04, 2012, 21:58:25 POSLE PODNE
Ovako bi trebalo da ti radi,stavio si gore da cuva ORGID,a nigde nisi definsao sta je uopste taj "orgid".

CMD:makeleader(playerid,params[])
{
new string[256];
new idx;
        new level;
new orgid;
new sendername[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
          new giveplayer[MAX_PLAYER_NAME];
    new tmp[256];
tmp = strtok(params, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /makeleader [ID Igraca/Dio Imena] [Broj(1-17)]");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
SendClientMessage(playerid, 0x33CCFFAA, "1.LSPD || 2. Slobodno || 3. Slobodno || 4. Slobodno ");
SendClientMessage(playerid, 0x33CCFFAA, "5.Slobodno || 6.Slobodno || 7.Slobodno || 8.Slobodno || 9.Slobodno || 10.Slobodno || 12.Slobodno");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
tmp = strtok(params, idx);
level = strval(tmp);
if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Nemojte ispod 0, ili preko 17!"); return 1; }
if(!IsPlayerAdmin(playerid))
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "* Postavljen si za lidera bande/mafije | Od strane Admina: {FFFFFF}%s", sendername);
SendClientMessage(para1, SVETLOPLAVA, string);
format(string, sizeof(string), "* Postavio si %s-a da vodi {FFFFFF}| %d.", giveplayer,level);
SendClientMessage(playerid, SVETLOPLAVA, 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; } //LS PD

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]);
                                            new INI:File = INI_Open(UserPath(playerid));
                                            INI_WriteInt(File,"Lider",level);
                                            INI_Close(File);
    if(level == 0)
    {
        PlayerInfo[para1][pRank] = 0;
    }
    else
    {
    PlayerInfo[para1][pRank] = 6;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}| {FFFF9C}TempoBot {FFFFFF}| Niste ovlasteni da koristite tu komandu.");
}
}
return 1;
}

Opet ne radi :/


Village's Roleplay USKORO...

Village's Roleplay USKORO...

Jesi napravio cuvanje i loadanje?
ODSUTAN

[quote author=[OGRP]Lucky link=topic=52732.msg383897#msg383897 date=1346788994]
Citat: ''KopriVa' poslato Septembar 04, 2012, 21:58:25 POSLE PODNE
Ovako bi trebalo da ti radi,stavio si gore da cuva ORGID,a nigde nisi definsao sta je uopste taj "orgid".

CMD:makeleader(playerid,params[])
{
new string[256];
new idx;
        new level;
new orgid;
new sendername[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
          new giveplayer[MAX_PLAYER_NAME];
    new tmp[256];
tmp = strtok(params, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /makeleader [ID Igraca/Dio Imena] [Broj(1-17)]");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
SendClientMessage(playerid, 0x33CCFFAA, "1.LSPD || 2. Slobodno || 3. Slobodno || 4. Slobodno ");
SendClientMessage(playerid, 0x33CCFFAA, "5.Slobodno || 6.Slobodno || 7.Slobodno || 8.Slobodno || 9.Slobodno || 10.Slobodno || 12.Slobodno");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
tmp = strtok(params, idx);
level = strval(tmp);
if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Nemojte ispod 0, ili preko 17!"); return 1; }
if(!IsPlayerAdmin(playerid))
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "* Postavljen si za lidera bande/mafije | Od strane Admina: {FFFFFF}%s", sendername);
SendClientMessage(para1, SVETLOPLAVA, string);
format(string, sizeof(string), "* Postavio si %s-a da vodi {FFFFFF}| %d.", giveplayer,level);
SendClientMessage(playerid, SVETLOPLAVA, 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; } //LS PD

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]);
                                            new INI:File = INI_Open(UserPath(playerid));
                                            INI_WriteInt(File,"Lider",level);
                                            INI_Close(File);
    if(level == 0)
    {
        PlayerInfo[para1][pRank] = 0;
    }
    else
    {
    PlayerInfo[para1][pRank] = 6;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}| {FFFF9C}TempoBot {FFFFFF}| Niste ovlasteni da koristite tu komandu.");
}
}
return 1;
}

Opet ne radi :/
[/quote]


Probaj ovo:

CMD:makeleader(playerid,params[])
{
new string[256];
new idx;
        new level;
new orgid;
new sendername[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
          new giveplayer[MAX_PLAYER_NAME];
    new tmp[256];
tmp = strtok(params, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /makeleader [ID Igraca/Dio Imena] [Broj(1-17)]");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
SendClientMessage(playerid, 0x33CCFFAA, "1.LSPD || 2. Slobodno || 3. Slobodno || 4. Slobodno ");
SendClientMessage(playerid, 0x33CCFFAA, "5.Slobodno || 6.Slobodno || 7.Slobodno || 8.Slobodno || 9.Slobodno || 10.Slobodno || 12.Slobodno");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
tmp = strtok(params, idx);
level = strval(tmp);
if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Nemojte ispod 0, ili preko 17!"); return 1; }
if(!IsPlayerAdmin(playerid))
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "* Postavljen si za lidera bande/mafije | Od strane Admina: {FFFFFF}%s", sendername);
SendClientMessage(para1, SVETLOPLAVA, string);
format(string, sizeof(string), "* Postavio si %s-a da vodi {FFFFFF}| %d.", giveplayer,level);
SendClientMessage(playerid, SVETLOPLAVA, 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; } //LS PD

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;
}
                                            PlayerInfo[playerid][pLeader] = level;
    SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
                                            new INI:File = INI_Open(UserPath(playerid));
                                            INI_WriteInt(File,"Lider",PlayerInfo[playerid][pLeader]);
                                            INI_Close(File);
    if(level == 0)
    {
        PlayerInfo[para1][pRank] = 0;
    }
    else
    {
    PlayerInfo[para1][pRank] = 6;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}| {FFFF9C}TempoBot {FFFFFF}| Niste ovlasteni da koristite tu komandu.");
}
}
return 1;
}
Izvinjavam se na svim glupostima i ako sam nekome napisao nesto lose, neko drugi je koristio moj profil!
__________________________________________
https://bk.gta.world - GTA World Balkan - RAGEMP

Citat: ''KopriVa' poslato Septembar 04, 2012, 22:12:41 POSLE PODNE
[quote author=[OGRP]Lucky link=topic=52732.msg383897#msg383897 date=13467mooooorrrrrrrooooonnnniiiiiiiiiiiiiii4]
Citat: ''KopriVa' poslato Septembar 04, 2012, 21:58:25 POSLE PODNE
Ovako bi trebalo da ti radi,stavio si gore da cuva ORGID,a nigde nisi definsao sta je uopste taj "orgid".

CMD:makeleader(playerid,params[])
{
new string[256];
new idx;
        new level;
new orgid;
new sendername[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
          new giveplayer[MAX_PLAYER_NAME];
    new tmp[256];
tmp = strtok(params, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /makeleader [ID Igraca/Dio Imena] [Broj(1-17)]");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
SendClientMessage(playerid, 0x33CCFFAA, "1.LSPD || 2. Slobodno || 3. Slobodno || 4. Slobodno ");
SendClientMessage(playerid, 0x33CCFFAA, "5.Slobodno || 6.Slobodno || 7.Slobodno || 8.Slobodno || 9.Slobodno || 10.Slobodno || 12.Slobodno");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
tmp = strtok(params, idx);
level = strval(tmp);
if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Nemojte ispod 0, ili preko 17!"); return 1; }
if(!IsPlayerAdmin(playerid))
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "* Postavljen si za lidera bande/mafije | Od strane Admina: {FFFFFF}%s", sendername);
SendClientMessage(para1, SVETLOPLAVA, string);
format(string, sizeof(string), "* Postavio si %s-a da vodi {FFFFFF}| %d.", giveplayer,level);
SendClientMessage(playerid, SVETLOPLAVA, 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; } //LS PD

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]);
                                            new INI:File = INI_Open(UserPath(playerid));
                                            INI_WriteInt(File,"Lider",level);
                                            INI_Close(File);
    if(level == 0)
    {
        PlayerInfo[para1][pRank] = 0;
    }
    else
    {
    PlayerInfo[para1][pRank] = 6;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}| {FFFF9C}TempoBot {FFFFFF}| Niste ovlasteni da koristite tu komandu.");
}
}
return 1;
}

Opet ne radi :/


Probaj ovo:

CMD:makeleader(playerid,params[])
{
new string[256];
new idx;
        new level;
new orgid;
new sendername[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
          new giveplayer[MAX_PLAYER_NAME];
    new tmp[256];
tmp = strtok(params, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /makeleader [ID Igraca/Dio Imena] [Broj(1-17)]");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
SendClientMessage(playerid, 0x33CCFFAA, "1.LSPD || 2. Slobodno || 3. Slobodno || 4. Slobodno ");
SendClientMessage(playerid, 0x33CCFFAA, "5.Slobodno || 6.Slobodno || 7.Slobodno || 8.Slobodno || 9.Slobodno || 10.Slobodno || 12.Slobodno");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
tmp = strtok(params, idx);
level = strval(tmp);
if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Nemojte ispod 0, ili preko 17!"); return 1; }
if(!IsPlayerAdmin(playerid))
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "* Postavljen si za lidera bande/mafije | Od strane Admina: {FFFFFF}%s", sendername);
SendClientMessage(para1, SVETLOPLAVA, string);
format(string, sizeof(string), "* Postavio si %s-a da vodi {FFFFFF}| %d.", giveplayer,level);
SendClientMessage(playerid, SVETLOPLAVA, 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; } //LS PD

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;
}
                                            PlayerInfo[playerid][pLeader] = level;
    SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
                                            new INI:File = INI_Open(UserPath(playerid));
                                            INI_WriteInt(File,"Lider",PlayerInfo[playerid][pLeader]);
                                            INI_Close(File);
    if(level == 0)
    {
        PlayerInfo[para1][pRank] = 0;
    }
    else
    {
    PlayerInfo[para1][pRank] = 6;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}| {FFFF9C}TempoBot {FFFFFF}| Niste ovlasteni da koristite tu komandu.");
}
}
return 1;
}

[/quote]
Nece ni ovako :/
Poslednja Izmena: Septembar 05, 2012, 08:52:19 PRE PODNE od [OGRP]Lucky


Village's Roleplay USKORO...

Village's Roleplay USKORO...

Pitanje broj 1 zasto ne koristis sscanf uz zcmd  ??? Pa milion puta ce ti lakse biti... :) I da li si uopste napravio loadanje accountova?

Moras da napravis cuvanje i loadovanje toga

Citat: Blaeks poslato Septembar 04, 2012, 23:32:04 POSLE PODNE
Moras da napravis cuvanje i loadovanje toga
Ma napravio sam sve, ali nece :/
Evo Loadovanje toga...
    INI_Int("Lider",PlayerInfo[playerid][pLeader]);
Ali cuvanje nemam :/


Village's Roleplay USKORO...

Village's Roleplay USKORO...

Pod OnPlayerDissconnect
INI_WriteInt(File,"Lider",PlayerInfo[playerid][pLeader]);
Poslednja Izmena: Septembar 05, 2012, 13:41:54 POSLE PODNE od Daniel Zero
ODSUTAN

Citat: Daniel Zero poslato Septembar 05, 2012, 13:41:37 POSLE PODNE
Pod OnPlayerDissconnect
INI_WriteInt(File,"Lider",PlayerInfo[playerid][pLeader]);
Opet isti problem :/


Village's Roleplay USKORO...

Village's Roleplay USKORO...

OMG, ajde mi reci kako ce ti sacuvati? Na nebo ?

Uopste nisi zadao lokaciju cuvanja, ti si samo rekao mu da upise podatke, no nisi tacno definisao lokaciju, znaci iznad onog Write int, moras staviti INIOpen i set tag i to, btw.niej ti y_ini nesto
Last nick: Vectro64

Citat: V_More poslato Septembar 05, 2012, 17:50:17 POSLE PODNE
OMG, ajde mi reci kako ce ti sacuvati? Na nebo ?

Uopste nisi zadao lokaciju cuvanja, ti si samo rekao mu da upise podatke, no nisi tacno definisao lokaciju, znaci iznad onog Write int, moras staviti INIOpen i set tag i to, btw.niej ti y_ini nesto
Ima IniOpen, ja sam kopirao sa ovim dijelom koji mi nece nisam ostatak :)


Village's Roleplay USKORO...

Village's Roleplay USKORO...

[quote author=[OGRP]Lucky link=topic=52732.msg384261#msg384261 date=1346861121]
Citat: V_More poslato Septembar 05, 2012, 17:50:17 POSLE PODNE
OMG, ajde mi reci kako ce ti sacuvati? Na nebo ?

Uopste nisi zadao lokaciju cuvanja, ti si samo rekao mu da upise podatke, no nisi tacno definisao lokaciju, znaci iznad onog Write int, moras staviti INIOpen i set tag i to, btw.niej ti y_ini nesto
Ima IniOpen, ja sam kopirao sa ovim dijelom koji mi nece nisam ostatak :)
[/quote]

Ini: SetTag("data") tako nesto ide, moras videti vec
Last nick: Vectro64

Stari covek

1. Sto ti cuvas acc od osobe koja kuca /makeleader zar ne treba osobi kojoj si dao?
2. Uradis ovako:

stock SaveUserAccount(playerid)
{
                new INI:File = INI_Open(UserPath(playerid));
                INI_WriteInt(File,"Lider",PlayerInfo[playerid][pLeader]);
                //Dodaj sve ostalo sto cuvas u acc-u tako da ti odmah sve sacuva jer i ovako moze da ti pravi problem da ne prepravi ono Lider na drugi broj
                INI_Close(File);
return 1;
}

Komanda:
CMD:makeleader(playerid,params[])
{
new string[256];
new idx;
        new level;
new orgid;
new sendername[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
          new giveplayer[MAX_PLAYER_NAME];
    new tmp[256];
tmp = strtok(params, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /makeleader [ID Igraca/Dio Imena] [Broj(1-17)]");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
SendClientMessage(playerid, 0x33CCFFAA, "1.LSPD || 2. Slobodno || 3. Slobodno || 4. Slobodno ");
SendClientMessage(playerid, 0x33CCFFAA, "5.Slobodno || 6.Slobodno || 7.Slobodno || 8.Slobodno || 9.Slobodno || 10.Slobodno || 12.Slobodno");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
tmp = strtok(params, idx);
level = strval(tmp);
if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Nemojte ispod 0, ili preko 17!"); return 1; }
if(!IsPlayerAdmin(playerid))
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "* Postavljen si za lidera bande/mafije | Od strane Admina: {FFFFFF}%s", sendername);
SendClientMessage(para1, SVETLOPLAVA, string);
format(string, sizeof(string), "* Postavio si %s-a da vodi {FFFFFF}| %d.", giveplayer,level);
SendClientMessage(playerid, SVETLOPLAVA, 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; } //LS PD

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]);
    SaveUserAccount(para1);
    if(level == 0)
    {
        PlayerInfo[para1][pRank] = 0;
    }
    else
    {
    PlayerInfo[para1][pRank] = 6;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}| {FFFF9C}TempoBot {FFFFFF}| Niste ovlasteni da koristite tu komandu.");
}
}
return 1;
}

Nisam pogledao sve ali ti TREBA da cuvas para1 to je id igraca
Poslednja Izmena: Septembar 05, 2012, 18:11:16 POSLE PODNE od [OG:RP] Mr.Gagi