Jail,prison,unprison

Započeo Vilko, Jun 10, 2010, 14:01:01 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Pokusavao sam napravit komande al neide.. Moze mi neko dat /jail ID Minuta Razlog /prison ID MINUTA RAZLOG /unprison ID razlog

Hvala,pokusavao sam al mi neide :(

if(strcmp(cmd, "/jail", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTITE: /jail [ID/Ime] [vrijeme(minute)]");
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)
        {
        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Pritvorili ste %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Pritvoreni ste od Admina %s.", sendername);
SendClientMessage(playa, COLOR_LIGHTRED, string);
ResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = money*60;
SetPlayerInterior(playa, 6);
SetPlayerPos(playa, 264.6288,77.5742,1001.0391);
format(string, sizeof(string), "Pritvoreni ste na %d minuta.   Racun: Nedostupan", money);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Niste autorizirani da koristite ovu komandu!");
}
}
return 1;
}

if(strcmp(cmd, "/prison",true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pAdmin] < 2)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Niste autorizirani da koristite ovu komandu !");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTITE: /prison [ID/Ime]");
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 u Alcatraz.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Postavljeni ste u Alcatraz od Admina %s.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
GameTextForPlayer(giveplayerid, "~w~Dobrodosli u ~n~~r~Alcatraz", 5000, 3);
WantedPoints[giveplayerid] = 0;
WantedLevel[giveplayerid] = 0;
PlayerInfo[giveplayerid][pJailed] = 2;
PlayerInfo[giveplayerid][pJailTime] = 3600;
            SetPlayerPos(giveplayerid, -1502.3997,1375.0138,3.6024);
        }
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac je Offline !");
    return 1;
}
    }
    return 1;
}
if(strcmp(cmd, "/unprison",true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pAdmin] < 2)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Niste autorizirani da koristite ovu komandu !");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTITE: /unprison [ID/Ime]");
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), "* Izvadili ste %s iz Alcatraza.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Izvadeni ste iz Alcatraza od Admina %s.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
GameTextForPlayer(giveplayerid, "~g~Sloboda ~n~~w~Neradite vise Non-RP", 5000, 3);
WantedPoints[giveplayerid] = 0;
WantedLevel[giveplayerid] = 0;
PlayerInfo[giveplayerid][pJailed] = 0;
PlayerInfo[giveplayerid][pJailTime] = 0;
            SetPlayerPos(giveplayerid, -1508.0762,1367.1425,2.4110);
        }
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac je Offline !");
    return 1;
}
    }
    return 1;
}

Citat: ╬Devilni Vilkoâ,,¢â•¬ poslato Jun 10, 2010, 14:01:01 POSLE PODNE
Pokusavao sam napravit komande al neide.. Moze mi neko dat /jail ID Minuta Razlog /prison ID MINUTA RAZLOG /unprison ID razlog

Hvala,pokusavao sam al mi neide :(
Pogledaj
Moze mi neko dat /jail ID Minuta razlog /prison ID MINUTA razlog /unprison ID razlog

Pa onda uzmi primjer kicka ili bana