mirror of
https://github.com/a-bad-dev/simple-shooter-game.git
synced 2026-06-08 20:12:11 +00:00
Make classes configurable per-map
This commit is contained in:
parent
58849c0164
commit
fea5b81cb6
4 changed files with 63 additions and 21 deletions
|
|
@ -51,7 +51,7 @@ core.register_on_joinplayer(function(player)
|
|||
})
|
||||
|
||||
if player:get_meta():get_string("class") == "" then
|
||||
player:get_meta():set_string("class", "assault")
|
||||
player:get_meta():set_string("class", "2") -- Assault
|
||||
end
|
||||
|
||||
set_player_mode(player, "normal")
|
||||
|
|
@ -91,13 +91,13 @@ core.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end
|
||||
|
||||
if fields.class_sniper then
|
||||
player:get_meta():set_string("class", "sniper")
|
||||
player:get_meta():set_string("class", "1")
|
||||
give_player_items(player)
|
||||
elseif fields.class_assault then
|
||||
player:get_meta():set_string("class", "assault")
|
||||
player:get_meta():set_string("class", "2")
|
||||
give_player_items(player)
|
||||
elseif fields.class_shotgun then
|
||||
player:get_meta():set_string("class", "shotgun")
|
||||
player:get_meta():set_string("class", "3")
|
||||
give_player_items(player)
|
||||
end
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue