Hallo, ich wollte mal fragen ob mir hier irgendwer helfen kann.
Also ich habe da ein Script der ein Team, die vorgegebenen waffen geben soll.
function giveWeaponsOnSpawn ( theSpawnpont, theTeam )
if(getTeamName(theTeam) == "AustrianPolice") then
giveWeapon ( source, 3, 1 ) -- Gives the nightstick weapon with 1 ammo
giveWeapon ( source, 33, 550 ) -- Gives the C.Rifle weapon with 550 ammo
elseif(getTeamName(theTeam) == "M.A.F.I.A") then
giveWeapon ( source, 1, 1 ) -- Gives the brass Knuckles weapon with 1 ammo
giveWeapon ( source, 5, 1 ) -- Gives the baseball weapon with 1 ammo
giveWeapon ( source, 18, 200 ) -- Gives the m.coktail weapon with 200 ammo
elseif(getTeamName(theTeam) == "AustrianFireFighter") then
giveWeapon ( source, 9, 1 ) -- Gives the chainsaw weapon with 1 ammo
giveWeapon ( source, 5, 1 ) -- Gives the baseball weapon with 1 ammo
giveWeapon ( source, 18, 200 ) -- Gives the m.coktail weapon with 200 ammo
elseif(getTeamName(theTeam) == "AustrianStuntClan") then
giveWeapon ( source, 22, 150 ) -- Gives the silenced weapon with 150 ammo
giveWeapon ( source, 27, 100 ) -- Gives the compat shotgun weapon with 100 ammo
end
end
addEventHandler ( "onPlayerSpawn", getRootElement(), giveWeaponsOnSpawn )
Alles anzeigen
Dies habe ich in die Resource Autoteams reingeschrieben.
Wenn ich jetzt aber die Resource Starte, kommt kein Fehler nix... aber wenn ich joine und ins Team komm, dann kommt in der Console der Fehler/Warning:
Warning: autoteams\server.lua: 250: Bad argument @ 'getTeamName'
Warning: autoteams\server.lua: 262: Bad argument @ 'getTeamName'
Warning: autoteams\server.lua: 274: Bad argument @ 'getTeamName'
Warning: autoteams\server.lua: 286: Bad argument @ 'getTeamName'
Diese zeilen 250 bis 286 sind im script diese: .... elseif(getTeamName(theTeam) == "MEIN TEAM NAME ") then ....
und ingame habe ich auch keine waffen,,, was ist falsch?