Ich suche ein Tool mit dem ich bestimmten Spielern eine bestimmte Spawnposition zuweisen kann. Kennt ihr so was öder könnt ihr mir so was machen?
Ich suche ein Tool mit dem ich bestimmten Spielern eine bestimmte Spawnposition zuweisen kann. Kennt ihr so was öder könnt ihr mir so was machen?
Ich habe so etwas ähnliches als ULX-Modul. Hier kann jeder Spieler seinen Spawn-Punkt festlegen.
Lua Code:
function Setspawn(ply) if (!ply:InVehicle() and ply:Alive() and ply:IsInWorld()) then ply.Spawnpos = ply:GetPos() + Vector(0,0,5) ply.Spawnangle = ply:EyeAngles() ULib.tsay( ply, "Your custom spawn point was set.", true)else
ULib.tsay( ply, "You have to be alive and stay outside of any vehicle while using this command.", true)end
end
ulx.concommand( "setspawn", Setspawn, "Set your custom spawn point.", ULib.ACCESS_ALL, "!setspawn") function Resetspawn(ply) ply.Spawnpos = nil ply.Spawnangle = nil ULib.tsay( ply, "Your spawn point was reset to the map defaults.", true)end
ulx.concommand( "resetspawn", Resetspawn, "Resets your spawn point to the map defaults.", ULib.ACCESS_ALL, "!resetspawn") function SetPlayerPosition(ply) if ply.Spawnpos != nil then ply:SetPos(ply.Spawnpos) ply:SetEyeAngles(ply.Spawnangle) ULib.tsay( ply, "You spawned at your custom spawn point.", true)end
end
hook.Add("PlayerSpawn","PlayerSpawn",SetPlayerPosition, -15)
lol, das sieht (fast) genauso aus wie C++
Echt jetzt?
LoC
ja...
als kleines beispielCode:cout<<"Wie heißt die Hauptstadt von Deutschland: "; cin>>antwort; if (antwort == "Berlin") cout<<"Richtig\n"; else cout<<"Depp\n";
Geändert von Aero (09.08.2008 um 20:30 Uhr)
Das läuft dann automatich, deswegen im Autorun.
mit !setspawn wird der Spawnpunkt gesetzt, mit !resetspawn wieder auf Standard gesetzt.
Mfg Tight
Geht net.
Am Anfang kommt immer ein Fehler und dann passiert nichts mehr wenn ich !setspawn eingebe.
Wenn du kein ULX installiert hast kanns auch net gehen, weil das is ein ULX Addon.