Wanted level 6, you cant /kill
#1

Okay i have robbers classid 1 and the kill command
pawn Код:
if (strcmp("/kill", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid, 0);
        return 1;
    }
where do i make it "You cannot kill yourself, you have a wanted level!"
Reply
#2

pawn Код:
#define MAX_KILL_WANTEDLEVEL ( 6 ) // Your choice

// OnPlayerCommandText
if (strcmp("/kill", cmdtext, true, 10) == 0) {
        if ( GetPlayerWantedLevel( playerid ) >= MAX_KILL_WANTEDLEVEL )
            return SendClientMessage( playerid, -1, "you are a wanted, cannot use it" );

        SetPlayerHealth(playerid, 0);
        return 1;
}
Hope it helps
Reply
#3

tthanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)