jo also ich habe ne nette function im wiki gefunden.
die ich auch übernehmen will . nur leider versuche ich seit ner weile diese bedingung
Code
local accountLoaded = xmlLoadFile ( "users/"..getPlayerName(source)..".xml")
if(accountLoaded)
then
local subnode = xmlFindChild ( accountLoaded, "adminstatus", 0)
if xmlNodeGetValue(subnode) == "1"
in diese function einzufügen ...
Code
function changeCarLightsColor ( thePlayer, command, red, green, blue )
local theVehicle = getPedOccupiedVehicle ( thePlayer )
if ( not theVehicle ) then
return outputChatBox( "You don't have vehicle!" )
end
red = tonumber ( red )
green = tonumber ( green )
blue = tonumber ( blue )
-- check if the colour values for red, green and blue are valid
if red and green and blue then
local color = setVehicleHeadLightColor ( theVehicle, red, green, blue )
if(not color) then
outputChatBox( "Failed to change vehicle lights color" )
else
outputChatBox ( "Vehicle lights color changed sucessfully" )
end
else
outputChatBox( "Failed to change vehicle lights color" )
end
end
addCommandHandler ( "carlights", changeCarLightsColor )
Alles anzeigen
bin ich zu doof oder geht das nicht?