Komanda /prison

Započeo FullSlaSh, April 21, 2010, 20:41:45 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Trazim komandu /prison ali da ima odredjeno vrijeme na koje ga stavljam kao na /jail

turker_kc

pa ima odredjeno vrijeme , 1 sat  :D :D

prison i unprison...
if(strcmp(cmd, "/prison",true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pAdmin] < 3)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Nisi admin !");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /prison [playerid/PartOfName]");
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), "* Zatvorio si %s u Areu51.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Zatvoren si u Areu51 od admina %s.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
GameTextForPlayer(giveplayerid, "~w~Zatvoren si u ~n~~r~Areu51", 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);
        }
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Offline je !");
    return 1;
}
    }
    return 1;
}

if(strcmp(cmd, "/unprison",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 3)
{
SendClientMessage(playerid, COLOR_GREY, "   Nisi admin !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTITE: /unprison [playerid/PartOfName]");
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), "* Pustio si %s iz aree.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Pustio te je admin %s.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
GameTextForPlayer(giveplayerid, "Pusten si iz aree.", 5000, 3);
PlayerInfo[giveplayerid][pJailed] = 0;
PlayerInfo[giveplayerid][pJailTime] = 0;
SetPlayerPos(giveplayerid, 88.5818,1924.8967,17.459);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "   Offline je !");
return 1;
}
    }
    return 1;
}

Citat: Panda poslato April 21, 2010, 20:42:33 POSLE PODNE
pa ima odredjeno vrijeme , 1 sat  :D :D
u mene ne :S kad ga stavis dok ga ne /unprison nece lik izac

onda vjerojatno nemas ovo:...

PlayerInfo[giveplayerid][pJailTime] = 3600;

Hvala Sam brza intervencija kao i uvijek. lockic