Problem at OnPlayerDeath
#1

I have a problem at OnPlayerDeath , i want to make a script for player with killing with wanted 10 enter in jail ...
Код:
 if(GetPlayerWantedLevel(killerid)>=10)
    {
            new KK[MAX_PLAYER_NAME];
       		    GetPlayerName(killerid, KK, sizeof(KK));
                ResetPlayerWeapons(killerid);
                SetPlayerInterior(killerid, 6);
                SetPlayerPos(killerid,264.6288,77.5742,1001.0391);
                PlayerInfo[killerid][pJailTime] = 400;
                PlayerInfo[killerid][pJailed] = 1;
                SetTimerEx("jailtime", 4000, 0, "d", playerid);
                format(string, 256, "%s jailed with killing with Wanted 10!",KK);
                SendClientMessageToAll(COLOR_LIGHTRED, string);
    }
I dont have error on copile but in game if player have wanted 10 and kill , player don`t enter jail!
Where is my mistake?

Sorry for my bad english!
Reply
#2

pawn Код:
new string[50];
            new KK[MAX_PLAYER_NAME];
                GetPlayerName(killerid, KK, sizeof(KK));
                ResetPlayerWeapons(killerid);
                SetPlayerInterior(killerid, 6);
                SetPlayerPos(killerid,264.6288,77.5742,1001.0391);
                PlayerInfo[killerid][pJailTime] = 400;
                PlayerInfo[killerid][pJailed] = 1;
                SetTimerEx("jailtime", 4000, 0, "d", playerid);
                format(string, 256, "%s jailed with killing with Wanted 10!",KK);
                SendClientMessageToAll(-1, string);
    }
Reply
#3

Solved! TC
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)