SA-MP Forums Archive
Wanted level 6, you cant /kill - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Wanted level 6, you cant /kill (/showthread.php?tid=272417)



Wanted level 6, you cant /kill - phil_lendon - 28.07.2011

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!"


Re: Wanted level 6, you cant /kill - Basicz - 28.07.2011

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


Re: Wanted level 6, you cant /kill - phil_lendon - 28.07.2011

tthanks!