Little bug in my commands
#1

Hey guys, I have a little bug in my server

When I do any command ingame it says altime that I am in a punishment but I don't.. And it can't be because I didn't add my admin sys in my server for some reasons.

This is one of the commands:

pawn Код:
CMD:kill(playerid, params[])
{
    if(IsCaged[playerid] == 1 || IsJailed[playerid] == 1|| IsFreezed[playerid] == 1)
    {
        SendClientMessage(playerid, -1, ""red"You are currently in your punishment... You must be wait to use any command!");
    }
    SetPlayerHealth(playerid, 0);
    GameTextForPlayer(playerid, "~r~KILLED!",2000,5);
    InMinigame[playerid] = 1;
    IsCaged[playerid] = 1;
    IsJailed[playerid] = 1;
    IsFreezed[playerid] = 1;
    return 1;
}
PHP код:
new IsCaged[MAX_PLAYERS];
new 
IsJailed[MAX_PLAYERS];
new 
IsFreezed[MAX_PLAYERS];
new 
InMinigame[MAX_PLAYERS]; 
So I dont know what I do wrong.. I hope anyone can help me out x)

Thanks
Reply
#2

check you named ini file,may be your injailed data is set to 1 if not then post it here
Reply
#3

I am not registered at my server, I dont use my admin sys now because it have some bugs.. So I am not jailed or another punishment..

There is nothing wrong with my command?
Reply
#4

try
pawn Code:
CMD:kill(playerid, params[])
{
if(IsCaged[playerid] == 1 || IsJailed[playerid] == 1|| IsFreezed[play
{
SendClientMessage(playerid, -1, ""red"You are currently in your p
}
SetPlayerHealth(playerid, 0);
GameTextForPlayer(playerid, "~r~KILLED!",2000,5);
InMinigame[playerid] = 0;
IsCaged[playerid] = 0;
IsJailed[playerid] = 0;
IsFreezed[playerid] = 0;
return 1;
}
Reply
#5

It's because your Jailed, Cage and such kind of variables are set to 1. Try setting them to 0 under OnPlayerConnect.
pawn Код:
public OnPlayerConnect(playerid)
{
 IsJailed[playerid] = 0;
 IsFreezed[playerid] = 0;
 IsCaged[playerid] = 0;
 IsMinigame[playerid] = 0;
 //Reset your player variables always, then LOAD if registered:
 return 1;
}
Reply
#6

he chaged them again and again to 1 in each command ...... I guess
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)