YCMD help :$
#1

Like when someone uses some command for example /kill, it allows them, even if they are jailed.
I'm jailed and I use /kill, it says "You have suicided" but after that, it sends "Server:Unknown command", but I just want to prevent him from using /kill while jailed.
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    for(new i, f = Robplaces; i < f; i++)
    {
        if(strcmp(cmdtext,RobCMDS[i]) == 0 && IsPlayerInRangeOfPoint(playerid, 5,RobPos[i][0],RobPos[i][1],RobPos[i][2]))
        {
            if(PInfo[playerid][RobbedStore] == 1) return SendClientMessage(playerid, Red, "« Error » "lyellow"You have recently robbed a store, please wait");
            GameTextForPlayer(playerid,"~r~~h~Time left: 10",4000,3);
            SendClientMessage(playerid, Red,"» "lorange"You have started a robbery... Please stay in the radius of this place");
            RobbingTimer[playerid] = SetTimerEx("Robbing",1000,true,"i",playerid);
            RobbingID[playerid] = i;
            RobbingTimeLeft[playerid] = 10;
            return 1;
        }
    }
    if(PInfo[playerid][Jailed] == 1 && strcmp(cmdtext,"/escape") != 0)
    {
        SendClientMessage(playerid,Red,"You can't use commands in jail.");
        return 0;
    }
    else if(success)
    {
        return 1;
    }
    return -1;
}
Reply
#2

Add this in your /kill command.
if(PInfo[playerid][Jailed] == 1)
{
SendClientMessage(playerid, COLOR_GRAD1,"You cannot use this command while in Jail");
return 1;
}
Reply
#3

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
Add this in your /kill command.
if(PInfo[playerid][Jailed] == 1)
{
SendClientMessage(playerid, COLOR_GRAD1,"You cannot use this command while in Jail");
return 1;
}
No shit sherlock.
But I have a big list of commands, and its not just the kill command I want to block.
It's all of them except /escape, I dont want to go through every command, adding them.
Reply
#4

Then add it in the starting of your OnPlayerCommandtext. So that he wont be able to use any command in Jail. Past the one's you want him to use above this particular if then Sherlock.

Your attitude is = that you'r perfect in scripting and want no additional help!
Reply
#5

Quote:
Originally Posted by FireCat
Посмотреть сообщение
No shit sherlock.
But I have a big list of commands, and its not just the kill command I want to block.
It's all of them except /escape, I dont want to go through every command, adding them.
He tried to help your request instead. You should stop saying bullsh**s and being banned for the 2645th time.
Reply
#6

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
Then add it in the starting of your OnPlayerCommandtext. So that he wont be able to use any command in Jail. Past the one's you want him to use above this particular if then Sherlock.

Your attitude is = that you'r perfect in scripting and want no additional help!
Sorry, but YCMD, is not compatible with the callback "OnPlayerCommandText", because its already being used.
Reply
#7

Quote:
Originally Posted by FireCat
Посмотреть сообщение
Sorry, but YCMD, is not compatible with the callback "OnPlayerCommandText", because its already being used.
Yeah right. Please wait for further replies. Maybe im not good enough to help you. But i tried, Thats all i know.
Its okay! All good bro, AS long as your learn from your mistakes, In real life or even in Internet world!

Quote:
Originally Posted by TheArcher
Посмотреть сообщение
He tried to help your request instead. You should stop saying bullsh**s and being banned for the 2645th time.
Lets just keep that aside for now brother. I dont want to flame this thing in here.
Reply
#8

Quote:
Originally Posted by FireCat
Посмотреть сообщение
Sorry, but YCMD, is not compatible with the callback "OnPlayerCommandText", because its already being used.
Not because is not compatibile but beacuse it's already called. Did you hear about hook?
Reply
#9

pawn Код:
if (PlayerDidNickalertSliceOnIRC(playerid))
    Ban(playerid);
Reply
#10

Quote:
Originally Posted by Slice
Посмотреть сообщение
pawn Код:
if (PlayerDidNickalertSliceOnIRC(playerid))
    Ban(playerid);
Stop trolling --'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)