What Do I Have To Do To Set GM To Midnight?
#1

Ok i got time now i have a few problems with my jail,

I dont want it to be able to /rob /kill in jail etc.

And if thay /q in jail when thay relog thay are back in there for same time,

How may i do this
Reply
#2

You mean like the time will be always midnight?
Add this under OnGameModeInit
pawn Код:
SetWorldTime(0);
Reply
#3

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
You mean like the time will be always midnight?
Add this under OnGameModeInit
pawn Код:
SetWorldTime(0);
Wow Thanks Dude!
Reply
#4

Could you help me stop /kill and /rob etc in jail?
Reply
#5

If You got the position of jail use this in your /kill and /rob:

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 20, x, y, z)) return 0; // 20 is the range, x,y,z are the coords of jail (I don't know)
Reply
#6

Quote:
Originally Posted by CAR
Посмотреть сообщение
If You got the position of jail use this in your /kill and /rob:

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 20, x, y, z)) return 0; // 20 is the range, x,y,z are the coords of jail (I don't know)
ist he x/y/z thing here orrr

SetPlayerPos(id, 198.1103,175.2664,1003.0234);??
Reply
#7

Okay,I see you have a cops and robbers server right?
That's pretty simple =P
pawn Код:
enum pInfo
{
    Jailed
};

new PlayerInfo[MAX_PLAYERS][pInfo];
Okay now,under your arrest command after all SetPlayerPos(id,JailPositions..) add this:

pawn Код:
PlayerInfo[id][Jailed] = 1;
And now /kill and /rob

pawn Код:
if(strcmp(cmd, "/kill", true) == 0)
    {
            if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,color,"You cannot kill yourself while you're jailed!");
            else return SetPlayerHealth(playerid,0);
            return 1;
        }
        if(strcmp(cmd, "/rob", true) == 0)
    {
            if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,color,"You cannot rob someone/a store while you're jailed");
            else
            {
               // Rest of your script
            }
            return 1;
        }
Reply
#8

how do i stop /ar /tk /rob etc in cars?
Reply
#9

pawn Код:
if(IsPlayerInAnyVehicle(playerid)) return 1;
Reply
#10

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
Okay,I see you have a cops and robbers server right?
That's pretty simple =P
pawn Код:
enum pInfo
{
    Jailed
};

new PlayerInfo[MAX_PLAYERS][pInfo];
Okay now,under your arrest command after all SetPlayerPos(id,JailPositions..) add this:

pawn Код:
PlayerInfo[id][Jailed] = 1;
And now /kill and /rob

pawn Код:
if(strcmp(cmd, "/kill", true) == 0)
    {
            if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,color,"You cannot kill yourself while you're jailed!");
            else return SetPlayerHealth(playerid,0);
            return 1;
        }
        if(strcmp(cmd, "/rob", true) == 0)
    {
            if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,color,"You cannot rob someone/a store while you're jailed");
            else
            {
               // Rest of your script
            }
            return 1;
        }

ahh i get errors we this go:

enum pInfo
{
Jailed
};
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)