Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if( cmd == "sethp" ){
- if( !text ) return player.Msg("Use /sethp <plr> <hp>");
- local params = split( text, " " );
- if( params.len() < 1 ) return player.Msg("Wrong no. of parameters.");
- else if( !IsNum( param[1] ) ) return player.Msg("HP must be an integer.");
- else if( param[1].tointeger() > 100 || param[1].tointeger() < 0 ) return player.Msg("It can't be more than 100 or less than 0.");
- local plr = IsNum( param[0] ) ? FindPlayer( param[0].tointeger() ) : FindPlayer( param[0] );
- if( !plr ) return player.Msg( "Wrong player." );
- else plr.Health = param[1].tointeger();
- }
- // http://forum.vc-mp.org/?topic=5017.0
Add Comment
Please, Sign In to add comment