I use this code:
local model = self.player:GetModel();
if (model == “models/player/vortigaunt.mdl”) then
self.player:GiveSpawnWeapon(player, “swep_vortigaunt_beam”);
end
But when I try to verify if the model is correct or not, it doesn’t work and I get this error on the console: attempt to call method ‘GetModel’ (a nil value)(Hook: PlayerSpawn).
Please, somebody can help me?
Thanks for all.