-
Posts
1,283 -
Joined
-
Last visited
Everything posted by manve1
-
what do you mean? sry but i don't get you.
-
I tried creating vehicle name and in bracket vehicle model, but i'm not sure if i done something wrong or not ( most probably something wrong ) setTimer( function( carModel ) local vehicleName = getVehicleNameFromModel ( carModel ) local vehicleModel = getVehicleModelFromName ( carModel ) if ( vehicleName ) and ( vehicleModel ) then guiSetText( veh, 'Weapon: '.. vehicleName .. ' (( '.. vehicleModel ..' )) ' ) end end, 50, 0 )
-
Thank you. (( I just noticed that after all i made it correct, just for some reason added function ))
-
I never used them, i had 7 or 8 tries to make it work, but i failed, here is the script: weap = guiCreateLabel( 0.2, 0.2, 0.1, 0.1, 'Weapon: ', true ) function weapname ( ) setTimer( function() local weaponType = getPedWeapon ( localPlayer ) if ( weaponType ) then guiSetText( weap, 'Weapon: '.. getWeaponNameFromID ( weaponType ) ) end end, 50, 0 ) end
-
Everything works, just it doesn't change the label ....
-
local level = 0 function floodSA(source,command,speed) if (isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Admin"))) then if (speed) then if (isTimer(waterTimer)) then killTimer(waterTimer) destroyElement(floodWater) setWaterLevel(0) level = 0 outputDebugString ("Previous flooding has been stopped by the server.") end local speed = tonumber(speed) floodWater = createWater(-2998,-2998,0,2998,-2998,0,-2998,2998,0,2998,2998,0) outputChatBox("--------------------------------",root,255,0,0) outputChatBox("ALERT: A FLOOD IS EMERGING! FIND HIGH GROUND!!!",root,255,0,0) outputChatBox("--------------------------------",root,255,0,0) waterTimer = setTimer(addSomeWater,100,0,speed) outputDebugString("Flooding started by "..getPlayerName (source).." at a speed of "..speed..".") else outputChatBox("You must specify a speed.",source,255,0,0) end else outputChatBox ("You must be an admin to use this command!",source,255,0,0) end end function floodCd() setTimer ( function() outputChatBox ( "Flood will start in 5 sec", root, 255, 0, 0 ) end, 5000, 1 ) end addCommandHandler("flood",floodCd)
-
How could i get what kind of weapon a person has in his hands? Like for example, if i have 'AK-47' in my hand, i would see it on a label.
-
How could i update player zone? function zonename() local x, y, z = getElementPosition ( localPlayer ) local zone = guiCreateLabel( 0.305, 0.005, 0.2, 0.05, "Zone: ".. getZoneName( x, y, z, true ), true ) end addEventHandler('onClientPlayerJoin', getRootElement(), zonename) addEventHandler('onClientResourceStart', getRootElement(), zonename)
-
So aparently you saying it didn't find me?
-
It output a message that: "DEBUG: 'onClientPlayerSerialRequested' returned false." And when i login, it doesn't change the labels
-
I asked help, and myonlake gave me code with it
-
Yeh, but if you create few cars with ID's: 411 and 495 via map editor, when u start the resource, they won't be damage proof until you enter them
-
1: onResourceStart has no player element. 2: getPedOccupiedVehicle returns the element userdata, not the vehicle model. addEventHandler ( "onVehicleEnter", root, function ( thePlayer ) local model = getElementModel ( source ) if ( model == 411 ) or ( model == 495 ) then setVehicleDamageProof ( source, true ) else setVehicleDamageProof ( source, false ) end setPlayerBlurLevel ( thePlayer, 0 ) end ) wouldn't your script only set the vehicle damage proof when you enter it? ( i mean like enter and perm set damage proof )?
-
Hmm... @Samer, you made that if a ped is in a car it would set it as damage proof, not when no one is in it too
-
SERVE-SIDE: setPlayerBlurLevel ( source, 0 ) CLIENT-SIDE: setBlurLevel ( 0 ) SERVER-SIDE: setTimer( function ( theVehicle ) local id = getElementModel ( theVehicle ) if (id == 411) and (id == 495) then setVehicleDamageProof(id, true) end end, 50, 1 ) BTW: use LUA codes
-
would be a lot better to help you with lua code... ( out of english language: (( Ismok anglu kalbos )) )
-
--Server-side addEvent( "salud4", true ) function setsalud4 (player) local PlayerMoney = getPlayerMoney(source) if ( PlayerMoney >= 5000) then setElementHealth ( source, 500 ) ; setPedStat(source, 22, 999); setPedStat(source, 23, 999); setPedStat(source, 24, 999); setPedStat(source, 225, 999); --bucear takePlayerMoney(source,5000); setTimer ( function() local Health5 = getElementHealth(source) setElementHealth ( source, Health5 + 1 ) end, 1000, 0 ); outputChatBox ( "*Has comprado virus Génesis por $5000*", source, 255, 0, 0 ) ; outputChatBox ( "*El virus te da +salud, +fuerza, +resistencia +resistencia de buceo. Durante 1 sesión*", source, 255, 0, 0 ) ; else outputChatBox("*No tienes suficiente dinero*", source, 255, 0, 0, true) end end addEventHandler ( "salud4", getRootElement(), setsalud4 ) try this, not tested, tell me if works or if it doesn't
-
I get this error now ERROR: server.lua:15: attempt to call global 'isLogged' (a nil value)
-
Lol? how can't it be found if he is playing D:
-
When i click on someone else, i get "DEBUG: 'onClientPlayerSerialRequested' returned false." in my chat D: is it possible to fix it?
