[POMOC] /prison CMD

Započeo mr.co0per, Septembar 03, 2012, 10:42:11 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:CLRP
Detaljan opis problema:Pa Ovako , kada nekog igraca zatvorim u Prison i mene daje tamo , t.e i mene zatvara... Daj Pomozite Sta treba da napravim?
Dio skripte: /prison Command
Neke slike/video za lakse dobivanje pomoci(neobavezno):Nemam

Jevo vam Moja CMD /prison

    if(strcmp(cmd, "/prison", true) == 0)
{
    if(IsPlayerConnected(playerid)) {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) {
            SendClientMessage(playerid, COLOR_GRAD2, "{FF8306}KORISTETE:{FFFFFF}/prison [ID/Ime na Igrac] [casa] [pricna]");
            return 1;
        }
        new playa;
        new money;
        playa = ReturnUser(tmp);
        tmp = strtok(cmdtext, idx);
        money = strval(tmp);
        if (PlayerInfo[playerid][pAdmin] >= 2) {
            if(IsPlayerConnected(playa)) {
                if(playa != INVALID_PLAYER_ID) {
                    new length = strlen(cmdtext);
                    while ((idx < length) && (cmdtext[idx] <= ' ')) {
                        idx++;
                    }
                    new offset = idx;
                    new result[64];
                    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
                        result[idx - offset] = cmdtext[idx];
                        idx++;
                    }
                    result[idx - offset] = EOS;
                    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    format(string, sizeof(string), "{37F906}INFO:{FFFFFF}Go zatvorivte %s.", giveplayer);
                    SendClientMessage(playerid, COLOR_YELLOW, string);
                    GameTextForPlayer(giveplayerid, "~w~Dobrodojdovte vo ~n~~r~Suto Orizari(Sutka)", 5000, 3);
                    format(string, sizeof(string), "{37F906}INFO:{FFFFFF}Zatvoreni ste od Administrator %s.", sendername);
                    SendClientMessage(playa, COLOR_YELLOW, string);
                    ResetPlayerWeapons(playa);
                    WantedPoints[playa] = 0;
                    WantedLevel[giveplayerid] = 0;
                    PlayerInfo[playa][pJailed] = 2;
                    PlayerInfo[playa][pJailTime] = money*3600;
                    SetPlayerInterior(playa, 0);
                    SetPlayerPos(giveplayerid, 167.5328,1894.9855,-38);
                    format(string, sizeof(string), "{37F906}INFO:{FFFFFF}Zatvoreni ste na %d casa.", money);
                    SendClientMessage(playa, COLOR_LIGHTBLUE, string);
                    format(string, sizeof(string), "Igracot %s e zatvoren vo Suto Orizari %d casa od Administrator %s, Pricina: %s", giveplayer, money, sendername, (result));
                    SendClientMessageToAll(COLOR_UBAVACRVENA, string);
                }
            }
        }
        else {
            SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}GRESKA:{FFFFFF}Nemozete da ja koristite ovaa komanda.");
        }
    }
    return 1;
}
ScripT

Capetroon.

Koristite tražilicu, evo ova komanda što sam našao:
if(strcmp(cmd, "/prison",true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pAdmin] < 2)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Niste ovlasteni za koristenje te komande !");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /prison [ID Igraca/Dio Imena]");
return 1;
}
giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
        if(giveplayerid != INVALID_PLAYER_ID)
        {
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Stavili ste %s-a u Areu-51.", giveplayer);
                    SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Admin%s vas je stavio u Areu-51.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
GameTextForPlayer(giveplayerid, "~w~Dobrodosli u ~n~~r~Area-51", 5000, 3);
WantedPoints[giveplayerid] = 0;
WantedLevel[giveplayerid] = 0;
PlayerInfo[giveplayerid][pJailed] = 2;
PlayerInfo[giveplayerid][pJailTime] = 3600;
            SetPlayerPos(giveplayerid, 107.2300,1920.6311,18.5208);
SetPlayerWorldBounds(giveplayerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
SetPlayerInterior(giveplayerid,0);
PlayerInfo[giveplayerid][pInt] = 0;
format(string, 256, "AdmCmd: %s has been prisoned by Admin %s.", giveplayer, sendername);
BroadCast(COLOR_LIGHTRED,string);
format(string, sizeof(string), "AdmCmd: %s je stavljen u areu od %s-a", giveplayer, sendername);
printf("%s",string);
        }
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Igrac je offline !");
    return 1;
}
    }
    return 1;
}

meni ovo radi:
if(strcmp(cmd, "/prison",true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pAdmin] < 2)
        {
            SendClientMessage(playerid, WHITE, "(greska) Niste autorizovani da koristite ovu komandu!");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /prison [ID Igraca]");
return 1;
}
giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
        if(giveplayerid != INVALID_PLAYER_ID)
        {
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Stavili ste {48E31C}%s-a u "COL_WHITE"Areu-51.", giveplayer);
SendClientMessage(playerid, ZELENKASTA, string);
format(string, sizeof(string), "* Admin {48E31C}%s "COL_WHITE"vas je stavio u {48E31C}Areu-51.", sendername);
SendClientMessage(giveplayerid, ZELENKASTA, string);
GameTextForPlayer(giveplayerid, "~w~Dobrodosli u ~n~~r~Area-51", 5000, 3);
WantedPoints[giveplayerid] = 0;
WantedLevel[giveplayerid] = 0;
PlayerInfo[giveplayerid][pJailed] = 2;
PlayerInfo[giveplayerid][pJailTime] = 3600;
            SetPlayerPos(giveplayerid, 107.2300,1920.6311,18.5208);
SetPlayerWorldBounds(giveplayerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
SetPlayerInterior(giveplayerid,0);
PlayerInfo[giveplayerid][pInt] = 0;
format(string, 256, " %s "COL_WHITE"je zatvoren od Admin "COL_RED"%s.", giveplayer, sendername);
ABroadCast(COLOR_WHITE,string,1);
format(string, sizeof(string), "Area51 | %s je stavljen u areu od %s-a", giveplayer, sendername);
printf("%s",string);
        }
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Igrac je offline!");
    return 1;
}
    }
    return 1;
}

Ma ja zelim primer da ga zatvorim Neko 1 saat , 2 saat koliko zelim ne ovako...
ScripT


to ako oces da nekog zatvoris primer na 2 sata onda kucaj /ajail i pisace ti sve ako nece /ajail probaj /jail ili /area, /aera

Citat: Tesaa poslato Septembar 04, 2012, 00:51:58 PRE PODNE
to ako oces da nekog zatvoris primer na 2 sata onda kucaj /ajail i pisace ti sve ako nece /ajail probaj /jail ili /area, /aera

Botino , Ja zelim da ga zatvaram koliko hocem a ne da pravim komandu , vidi ovu staru primer idem /jail Darko_Atanasovic 20 ...
I zatvara ga 20casa ... :@ 
ScripT

Vegas.

    if(strcmp(cmd, "/prison", true) == 0)
{
    if(IsPlayerConnected(playerid)) {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) {
            SendClientMessage(playerid, COLOR_GRAD2, "{FF8306}KORISTETE:{FFFFFF}/prison [ID/Ime na Igrac] [casa] [pricna]");
            return 1;
        }
        new playa;
        new money;
        playa = ReturnUser(tmp);
        tmp = strtok(cmdtext, idx);
        money = strval(tmp);
        if (PlayerInfo[playerid][pAdmin] >= 2) {
            if(IsPlayerConnected(playa)) {
                if(playa != INVALID_PLAYER_ID) {
                    new length = strlen(cmdtext);
                    while ((idx < length) && (cmdtext[idx] <= ' ')) {
                        idx++;
                    }
                    new offset = idx;
                    new result[64];
                    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
                        result[idx - offset] = cmdtext[idx];
                        idx++;
                    }
                    result[idx - offset] = EOS;
                    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    format(string, sizeof(string), "{37F906}INFO:{FFFFFF}Go zatvorivte %s.", giveplayer);
                    SendClientMessage(playerid, COLOR_YELLOW, string);
                    GameTextForPlayer(giveplayerid, "~w~Dobrodojdovte vo ~n~~r~Suto Orizari(Sutka)", 5000, 3);
                    format(string, sizeof(string), "{37F906}INFO:{FFFFFF}Zatvoreni ste od Administrator %s.", sendername);
                    SendClientMessage(playa, COLOR_YELLOW, string);
                    ResetPlayerWeapons(playa);
                    WantedPoints[playa] = 0;
                    WantedLevel[giveplayerid] = 0;
                    PlayerInfo[playa][pJailed] = 2;
                    PlayerInfo[playa][pJailTime] = money;
                    SetPlayerInterior(playa, 0);
                    SetPlayerPos(giveplayerid, 167.5328,1894.9855,-38);
                    format(string, sizeof(string), "{37F906}INFO:{FFFFFF}Zatvoreni ste na %d casa.", money);
                    SendClientMessage(playa, COLOR_LIGHTBLUE, string);
                    format(string, sizeof(string), "Igracot %s e zatvoren vo Suto Orizari %d casa od Administrator %s, Pricina: %s", giveplayer, money, sendername, (result));
                    SendClientMessageToAll(COLOR_UBAVACRVENA, string);
                }
            }
        }
        else {
            SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}GRESKA:{FFFFFF}Nemozete da ja koristite ovaa komanda.");
        }
    }
    return 1;
}