[Plugin] Lua in SA-MP v0.1 (Alpha)
#21

Quote:
Originally Posted by Drake1994
Посмотреть сообщение
As I mentioned in the main post you need to start manually the resource with "start resourcename".
Yah, thanks

Anything is wrong with this? http://pastebin.com/xkT2cWhR

Im going to bed now e tomorrow I see, thanks for the help.
Reply
#22

Quote:
Originally Posted by Coystark
Посмотреть сообщение
Yah, thanks

Anything is wrong with this? http://pastebin.com/xkT2cWhR

Im going to bed now e tomorrow I see, thanks for the help.
Код:
 if level < 0 || level > 5
	sendClientMessage(playerid, COLOR_WHITE, "Level [1/5]")
	return
end
You forgot to add "then" after the if statement and the or operator in Lua is "or" instead of "||".
Reply
#23

v0.2.2 released:
- I think that tests was successfull and the plugin no longer in Alpha state.
- Resources now need to be in the following folder: "lua/resources/".
- Resources can be loaded from server.cfg with the following setting: luascripts resourcename
- Inside the resource Lua files now load into the same virtual machine and therefore functions are shared within the same resource.
- Lua virtual machines were not perfectly stopped.
- Fixed the timer.
- New object manager implemented.
- Added makefile therefore it can be compile in Linux (usage: make LUASAMP). I didn't tested under Linux so there can be some issues/crashes with it.
- Fixed various crashes with timer when resource is being stopped.
- Some junk codes removed.
- New functions added to the argument reader.
- Added Lua stack debug function.

Added "call" function that allows to call a function from other resource (given resource need to running). i.e.:
Код:
call("resourcename", "functioname", [arguments...])
If you don't like the previous method you can call function with the "export" global variable (it is similar to MTA "exports" global variable). i.e.:
Код:
export['resourcename'].testFunction("some string", 10, 20.0, true)
export['resourcename']:testFunction("some string", 10, 20.0, true)
export['resourcename']['testFunction']("some string", 10, 20.0, true)
- Added "isResourceRunning" function that allows to check if a given resource is running or not.
- Now you can load modules too that allows to implement several Lua function. Modules can be loaded from server.cfg with the following setting: luamodules modulename.dll
- Modules need to be placed in the following folder: "lua/modules/".
- Added Modul SDK which helps to make module (MTA mysql module imported for example).
Reply
#24

This is very interesting! Well done man.
Reply
#25

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
This is very interesting! Well done man.
Thanks!
Plugin compiled to Linux (along with module_sdk example and mta_mysql), it can be found in the Release section!
Reply
#26

v0.2.3 Released
- Fixed stack leak when using call.
- Fixed call function: arguments starts at index 1 and not 3
- Fixed prescript when using "export" will not call function correctly if no argument passed.
- Accepted "export" calls:
Код:
export['resourcename'].functionName([arguments ...])
export['resourcename']:functionName([arguments ...])
export['resourcename']['functionName']([arguments ...])
export.resourcename.functionName([arguments ...])
export.resourcename:functionName([arguments ...])
export.resourcename['functionName']([arguments ...])

local resource = export['resourcename']
resource.functionName([arguments ...])
resource:functionName([arguments ...])
resource['functionName']([arguments ...])
Download
Plugin
Source code
Reply
#27

Nice work. Now again good and well arranged source code :P
Reply
#28

Amazing work, very useful. Thanks!

Is there SQLite functions? (you could make a list with the functions and events)
Reply
#29

Quote:
Originally Posted by HardWar
Посмотреть сообщение
Amazing work, very useful. Thanks!

Is there SQLite functions? (you could make a list with the functions and events)
Well for some reason GDK don't have SQLite functions, but you can use MTA MySQL module which is included.
Reply
#30

Why am I getting this?

Reply
#31

Quote:
Originally Posted by HardWar
Посмотреть сообщение
Why am I getting this?

What's your code? Can you send me here or in private message?

P.S.: I will update the plugin soon to give some info which line gives error.
Reply
#32

Edit: I've found the mistake, there was a ']]' in the last line.
Reply
#33

v0.2.4 released:
- Fixed a bug where callbacks weren't called correctly.

Download:
Plugin - Plugin
Source code
Reply
#34

Great! Thanks.
Reply
#35

v0.2.5 released:
- Added "tocolor" function which provide to convert color/number from 64 bit to
32 bit (Lua is in 64bit, PAWN is in 32bit, therefore there was some
mix-up).
Usage:
Код:
tocolor(r, g, b, a)
tocolor(r, g, b)
tocolor(hex color)

I.E.:
tocolor(255, 0, 0, 255)
tocolor(255, 0, 0)
tocolor(0xFF0000FF)
Download:
Plugin - Plugin
Source code

P.S.: If I have more free time I will make a wiki.
Reply
#36

Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[00:23:32] 
[00:23:32] Server Plugins
[00:23:32] --------------
[00:23:32]  Loading plugin: lua_samp
[00:23:32]  Lua in SA-MP v0.2.4 by DrAkE successfully loaded.
[00:23:32]   Loaded.
[00:23:32]  Loaded 1 plugins.

[00:23:32] 
[00:23:32] Filterscripts
[00:23:32] ---------------
[00:23:32]   Loading filterscript 'rcon.amx'...
[00:23:32]   Loaded 1 filterscripts.

[00:23:32] Number of vehicle models: 0
Doesnt want to load it. Could you help?
Reply
#37

Good job, I hope you always keep this up to date

For Everyone wondering the functions:
List of Functions/Variables (not organized):
Quote:

[19:10:28] WEAPON_SPRAYCAN
[19:10:28] OBJECT_MATERIAL_SIZE_512x512
[19:10:28] getPlayerTeam
[19:10:28] getVehicleDamageStatus
[19:10:28] isPlayerInVehicle
[19:10:28] setPlayerTeam
[19:10:28] PLAYER_STATE_SPAWNED
[19:10:28] removePlayerFromVehicle
[19:10:28] vectorSize
[19:10:28] setVehicleParamsEx
[19:10:28] addPlayerClass
[19:10:28] WEAPON_FIREEXTINGUISHER
[19:10:28] removePlayerAttachedObject
[19:10:28] attachCameraToObject
[19:10:28] WEAPON_DILDO
[19:10:28] getPlayerLastShotVectors
[19:10:28] textDrawColor
[19:10:28] textDrawSetPreviewVehCol
[19:10:28] BULLET_HIT_TYPE_OBJECT
[19:10:28] MAX_MENUS
[19:10:28] loadlib
[19:10:28] enableStuntBonusForPlayer
[19:10:28] HTTP_ERROR_CANT_CONNECT
[19:10:28] playerTextDrawDestroy
[19:10:28] attachCameraToPlayerObject
[19:10:28] sendDeathMessage
[19:10:28] allowPlayerTeleport
[19:10:28] textDrawUseBox
[19:10:28] isValidActor
[19:10:28] getmetatable
[19:10:28] INVALID_3DTEXT_ID
[19:10:28] blockIpAddress
[19:10:28] VEHICLE_MODEL_INFO_SIZE
[19:10:28] KEY_ANALOG_RIGHT
[19:10:28] DIALOG_STYLE_TABLIST_HEADERS
[19:10:28] attach3DTextLabelToVehicle
[19:10:28] isPlayerAdmin
[19:10:28] getPlayerSurfingObjectID
[19:10:28] getVehicleParamsEx
[19:10:28] getPlayerCameraAspectRatio
[19:10:28] getActorPos
[19:10:28] isActorInvulnerable
[19:10:28] playerTextDrawFont
[19:10:28] PLAYER_STATE_SPECTATING
[19:10:28] setActorPos
[19:10:28] MAX_PLAYER_NAME
[19:10:28] setPlayerMapIcon
[19:10:28] getPVarType
[19:10:28] WEAPON_PARACHUTE
[19:10:28] setCameraBehindPlayer
[19:10:28] getPlayerWeapon
[19:10:28] isPlayerNPC
[19:10:28] addCommandHandler
[19:10:28] VEHICLE_MODEL_INFO_FRONT_BUMPER_Z
[19:10:28] SELECT_OBJECT_GLOBAL_OBJECT
[19:10:28] getPlayerVehicleID
[19:10:28] PLAYER_STATE_ENTER_VEHICLE_DRIVER
[19:10:28] setPlayerShopName
[19:10:28] getVehicleParamsSirenState
[19:10:28] updateVehicleDamageStatus
[19:10:28] togglePlayerSpectating
[19:10:28] WEAPON_NITESTICK
[19:10:28] WEAPON_GOLFCLUB
[19:10:28] getTickCount
[19:10:28] textDrawTextSize
[19:10:28] setVehicleParamsForPlayer
[19:10:28] WEAPON_GRENADE
[19:10:28] HTTP_ERROR_CONTENT_TOO_BIG
[19:10:28] getPlayerMenu
[19:10:28] setPlayerRandomSpawn
[19:10:28] getPlayerState
[19:10:28] WEAPON_ROCKETLAUNCHER
[19:10:28] TEXT_DRAW_FONT_MODEL_PREVIEW
[19:10:28] WEAPON_MP5
[19:10:28] EDIT_RESPONSE_FINAL
[19:10:28] VEHICLE_MODEL_INFO_REARSEAT
[19:10:28] OBJECT_MATERIAL_SIZE_64x64
[19:10:28] WEAPON_CHAINSAW
[19:10:28] OBJECT_MATERIAL_TEXT_ALIGN_LEFT
[19:10:28] sendPlayerMessageToAll
[19:10:28] CARMODTYPE_SIDESKIRT
[19:10:28] BULLET_HIT_TYPE_PLAYER
[19:10:28] isTrailerAttachedToVehicle
[19:10:28] getObjectModel
[19:10:28] attach3DTextLabelToPlayer
[19:10:28] OBJECT_MATERIAL_SIZE_256x32
[19:10:28] playerTextDrawShow
[19:10:28] setPlayerChatBubble
[19:10:28] OBJECT_MATERIAL_SIZE_256x64
[19:10:28] isValidMenu
[19:10:28] textDrawCreate
[19:10:28] createActor
[19:10:28] getActorHealth
[19:10:28] _G
[19:10:28] getPVarFloat
[19:10:28] HTTP_ERROR_NO_SOCKET
[19:10:28] KEY_CROUCH
[19:10:28] getPlayerTargetPlayer
[19:10:28] WEAPON_CANE
[19:10:28] setActorInvulnerable
[19:10:28] textDrawLetterSize
[19:10:28] setPVarFloat
[19:10:28] getPVarInt
[19:10:28] playerTextDrawBackgroundColor
[19:10:28] setPlayerMarkerForPlayer
[19:10:28] setPVarInt
[19:10:28] getPlayerDrunkLevel
[19:10:28] playAudioStreamForPlayer
[19:10:28] getPlayerCameraMode
[19:10:28] moveObject
[19:10:28] textDrawSetOutline
[19:10:28] setVehicleZAngle
[19:10:28] setPlayerDrunkLevel
[19:10:28] SELECT_OBJECT_PLAYER_OBJECT
[19:10:28] gangZoneStopFlashForAll
[19:10:28] KEY_FIRE
[19:10:28] setPlayerAttachedObject
[19:10:28] textDrawBoxColor
[19:10:28] PLAYER_MARKERS_MODE_GLOBAL
[19:10:28] debug
[19:10:28] setVehicleHealth
[19:10:28] sendRconCommand
[19:10:28] WEAPON_DILDO2
[19:10:28] getPlayerMoney
[19:10:28] editAttachedObject
[19:10:28] textDrawSetShadow
[19:10:28] getNetworkStats
[19:10:28] WEAPON_SAWEDOFF
[19:10:28] MAX_GANG_ZONES
[19:10:28] setVehicleVirtualWorld
[19:10:28] addStaticVehicleEx
[19:10:28] disablePlayerRaceCheckpoint
[19:10:28] clearAnimations
[19:10:28] netStats_BytesSent
[19:10:28] setPlayerPosFindZ
[19:10:28] CARMODTYPE_FRONT_BUMPER
[19:10:28] KEY_ANALOG_DOWN
[19:10:28] getVehiclePoolSize
[19:10:28] getVehicleVirtualWorld
[19:10:28] getVehicleVelocity
[19:10:28] getPlayerWeaponData
[19:10:28] getPlayerVirtualWorld
[19:10:28] gangZoneShowForAll
[19:10:28] attachObjectToObject
[19:10:28] setPlayerColor
[19:10:28] getPlayerDistanceFromPoint
[19:10:28] getPlayerCameraTargetVehicle
[19:10:28] destroyPlayerObject
[19:10:28] setNameTagDrawDistance
[19:10:28] getPlayerFightingStyle
[19:10:28] setVehicleVelocity
[19:10:28] addStaticVehicle
[19:10:28] createPlayerTextDraw
[19:10:28] OBJECT_MATERIAL_SIZE_128x64
[19:10:28] WEAPON_HEATSEEKER
[19:10:28] getVehicleParamsCarWindows
[19:10:28] getVehicleRotationQuat
[19:10:28] getVehicleHealth
[19:10:28] coroutine
[19:10:28] CARMODTYPE_EXHAUST
[19:10:28] setPlayerSkillLevel
[19:10:28] INVALID_ACTOR_ID
[19:10:28] gameTextForPlayer
[19:10:28] type
[19:10:28] showPlayerNameTagForPlayer
[19:10:28] playerTextDrawColor
[19:10:28] MAX_PLAYER_TEXT_DRAWS
[19:10:28] getPlayerVehicleSeat
[19:10:28] WEAPON_MOLTOV
[19:10:28] PLAYER_STATE_EXIT_VEHICLE
[19:10:28] updatePlayer3DTextLabelText
[19:10:28] MoneyGrubScoreUpdate
[19:10:28] require
[19:10:28] rawset
[19:10:28] EDIT_RESPONSE_CANCEL
[19:10:28] gameTextForAll
[19:10:28] createVehicle
[19:10:28] playerTextDrawSetOutline
[19:10:28] getVehicleModelInfo
[19:10:28] getPlayerFacingAngle
[19:10:28] isPlayerConnected
[19:10:28] playerTextDrawSetPreviewVehCol
[19:10:28] getPlayerObjectModel
[19:10:28] setMenuColumnHeader
[19:10:28] setPlayerFacingAngle
[19:10:28] setObjectsDefaultCameraCol
[19:10:28] setWorldTime
[19:10:28] textDrawSetProportional
[19:10:28] setVehicleToRespawn
[19:10:28] call
[19:10:28] getPlayerCameraTargetObject
[19:10:29] PLAYER_STATE_ENTER_VEHICLE_PASSENGER
[19:10:29] getMaxPlayers
[19:10:29] WEAPON_VEHICLE
[19:10:29] addStaticPickup
[19:10:29] KEY_SECONDARY_ATTACK
[19:10:29] OBJECT_MATERIAL_SIZE_512x256
[19:10:29] setPlayerWantedLevel
[19:10:29] interpolateCameraLookAt
[19:10:29] setActorVirtualWorld
[19:10:29] MAX_3DTEXT_GLOBAL
[19:10:29] INVALID_GANG_ZONE
[19:10:29] OBJECT_MATERIAL_SIZE_128x128
[19:10:29] KEY_CTRL_BACK
[19:10:29] getPlayerPos
[19:10:29] textDrawShowForAll
[19:10:29] setPlayerPos
[19:10:29] showPlayerDialog
[19:10:29] getActorVirtualWorld
[19:10:29] applyAnimation
[19:10:29] spawnPlayer
[19:10:29] getServerVarAsString
[19:10:29] getPVarNameAtIndex
[19:10:29] putPlayerInVehicle
[19:10:29] limitGlobalChatRadius
[19:10:29] resetPlayerMoney
[19:10:29] PLAYER_STATE_NONE
[19:10:29] isActorStreamedIn
[19:10:29] KEY_NO
[19:10:29] CARMODTYPE_SPOILER
[19:10:29] isVehicleStreamedIn
[19:10:29] hideMenuForPlayer
[19:10:29] killTimer
[19:10:29] deletePVar
[19:10:29] CARMODTYPE_STEREO
[19:10:29] setVehicleAngularVelocity
[19:10:29] PLAYER_STATE_WASTED
[19:10:29] pairs
[19:10:29] OBJECT_MATERIAL_SIZE_256x256
[19:10:29] destroyActor
[19:10:29] getVehicleModel
[19:10:29] sendClientMessageToAll
[19:10:29] getPlayerWeaponState
[19:10:29] createPickup
[19:10:29] textDrawSetString
[19:10:29] _VERSION
[19:10:29] DIALOG_STYLE_MSGBOX
[19:10:29] rawget
[19:10:29] WEAPON_DEAGLE
[19:10:29] detachTrailerFromVehicle
[19:10:29] disableInteriorEnterExits
[19:10:29] addEventHandler
[19:10:29] givePlayerWeapon
[19:10:29] INVALID_MENU
[19:10:29] destroyVehicle
[19:10:29] editPlayerObject
[19:10:29] disableMenu
[19:10:29] lua_HTTP
[19:10:29] textDrawShowForPlayer
[19:10:29] WEAPON_SNIPER
[19:10:29] WEAPON_BAT
[19:10:29] attachPlayerObjectToPlayer
[19:10:29] removePlayerMapIcon
[19:10:29] setPlayerWeather
[19:10:29] setPlayerObjectPos
[19:10:29] TEXT_DRAW_FONT_SPRITE_DRAW
[19:10:29] stopObject
[19:10:29] HTTP_ERROR_BAD_HOST
[19:10:29] select
[19:10:29] isValidPlayerObject
[19:10:29] load
[19:10:29] getPlayerObjectPos
[19:10:29] setPlayerObjectNoCameraCol
[19:10:29] setPlayerScore
[19:10:29] sendDeathMessageToPlayer
[19:10:29] attachObjectToVehicle
[19:10:29] getPlayerScore
[19:10:29] DIALOG_STYLE_PASSWORD
[19:10:29] getPlayerCameraTargetPlayer
[19:10:29] OBJECT_MATERIAL_SIZE_32x32
[19:10:29] setPlayerSpecialAction
[19:10:29] setPlayerVelocity
[19:10:29] allowAdminTeleport
[19:10:29] playCrimeReportForPlayer
[19:10:29] getPlayerVelocity
[19:10:29] gangZoneStopFlashForPlayer
[19:10:29] WEAPON_DROWN
[19:10:29] loadfile
[19:10:29] OBJECT_MATERIAL_SIZE_64x32
[19:10:29] utf8
[19:10:29] INVALID_VEHICLE_ID
[19:10:29] getVehicleTrailer
[19:10:29] netStats_MessagesReceived
[19:10:29] getVehicleParamsCarDoors
[19:10:29] disablePlayerCheckpoint
[19:10:29] BULLET_HIT_TYPE_NONE
[19:10:29] manualVehicleEngineAndLights
[19:10:29] textDrawHideForAll
[19:10:29] setObjectPos
[19:10:29] WEAPON_CAMERA
[19:10:29] OBJECT_MATERIAL_SIZE_512x128
[19:10:29] INVALID_OBJECT_ID
[19:10:29] getVehiclePos
[19:10:29] MAX_3DTEXT_PLAYER
[19:10:29] setVehicleParamsCarDoors
[19:10:29] WEAPON_FLAMETHROWER
[19:10:29] setVehiclePos
[19:10:29] setObjectMaterial
[19:10:29] allowInteriorWeapons
[19:10:29] setPlayerWorldBounds
[19:10:29] dofile
[19:10:29] math
[19:10:29] getVehicleComponentInSlot
[19:10:29] isPlayerStreamedIn
[19:10:29] getPlayerSurfingVehicleID
[19:10:29] stopRecordingPlayerData
[19:10:29] getPlayerKeys
[19:10:29] getAnimationName
[19:10:29] PLAYER_MARKERS_MODE_OFF
[19:10:29] changeVehiclePaintjob
[19:10:29] KEY_LOOK_LEFT
[19:10:29] CARMODTYPE_REAR_BUMPER
[19:10:29] attachPlayerObjectToVehicle
[19:10:29] destroyMenu
[19:10:29] playerTextDrawUseBox
[19:10:29] attachTrailerToVehicle
[19:10:29] tostring
[19:10:29] getPlayerTargetActor
[19:10:29] playerTextDrawHide
[19:10:29] WEAPON_SHOTGUN
[19:10:29] table
[19:10:29] getPVarsUpperIndex
[19:10:29] setPlayerObjectMaterial
[19:10:29] netStats_GetIpPort
[19:10:29] cancelEdit
[19:10:29] textDrawSetPreviewModel
[19:10:29] setPlayerSkin
[19:10:29] enableZoneNames
[19:10:29] MAX_PLAYERS
[19:10:29] showNameTags
[19:10:29] movePlayerObject
[19:10:29] setPlayerInterior
[19:10:29] getPlayerSkin
[19:10:29] getPlayerNetworkStats
[19:10:29] getVehicleDistanceFromPoint
[19:10:29] WEAPON_SATCHEL
[19:10:29] HTTP_POST
[19:10:29] getPlayerInterior
[19:10:29] cancelSelectTextDraw
[19:10:29] setupPlayerForClassSelection
[19:10:29] VEHICLE_MODEL_INFO_REAR_BUMPER_Z
[19:10:29] VEHICLE_MODEL_INFO_WHEELSMID
[19:10:29] setPlayerCameraLookAt
[19:10:29] WEAPON_SHOTGSPA
[19:10:29] setGameModeText
[19:10:29] VEHICLE_MODEL_INFO_WHEELSREAR
[19:10:29] VEHICLE_MODEL_INFO_WHEELSFRONT
[19:10:29] VEHICLE_MODEL_INFO_PETROLCAP
[19:10:29] setPlayerArmedWeapon
[19:10:29] VEHICLE_MODEL_INFO_FRONTSEAT
[19:10:29] VEHICLE_PARAMS_ON
[19:10:29] PLAYER_STATE_DRIVER
[19:10:29] VEHICLE_PARAMS_OFF
[19:10:29] VEHICLE_PARAMS_UNSET
[19:10:29] CARMODTYPE_VENT_LEFT
[19:10:29] createExplosionForPlayer
[19:10:29] selectObject
[19:10:29] CARMODTYPE_HYDRAULICS
[19:10:29] clearActorAnimations
[19:10:29] setPlayerObjectRot
[19:10:29] sendClientMessage
[19:10:29] getPlayerCameraTargetActor
[19:10:29] MAX_OBJECTS
[19:10:29] getPlayerObjectRot
[19:10:29] addVehicleComponent
[19:10:29] CARMODTYPE_NITRO
[19:10:29] CARMODTYPE_LAMPS
[19:10:29] getPlayerName
[19:10:29] CARMODTYPE_ROOF
[19:10:29] addMenuItem
[19:10:29] CARMODTYPE_HOOD
[19:10:29] setPlayerName
[19:10:29] getPlayerSpecialAction
[19:10:29] createObject
[19:10:29] BULLET_HIT_TYPE_VEHICLE
[19:10:29] EDIT_RESPONSE_UPDATE
[19:10:29] getPlayerAmmo
[19:10:29] assert
[19:10:29] givePlayerMoney
[19:10:29] string
[19:10:29] isPlayerAttachedObjectSlotUsed
[19:10:29] KEY_YES
[19:10:29] KEY_RIGHT
[19:10:29] HTTP_HEAD
[19:10:29] playerTextDrawSetString
[19:10:29] KEY_DOWN
[19:10:29] KEY_UP
[19:10:29] PLAYER_STATE_PASSENGER
[19:10:29] KEY_ANALOG_UP
[19:10:29] WEAPON_KATANA
[19:10:29] getWeaponName
[19:10:29] WEAPON_RIFLE
[19:10:29] KEY_SUBMISSION
[19:10:29] gangZoneHideForAll
[19:10:29] WEAPON_MINIGUN
[19:10:29] KEY_HANDBRAKE
[19:10:29] KEY_LOOK_RIGHT
[19:10:29] print
[19:10:29] KEY_ACTION
[19:10:29] disableMenuRow
[19:10:29] KEY_SPRINT
[19:10:29] KEY_JUMP
[19:10:29] WEAPON_COLLISION
[19:10:29] isPlayerInRangeOfPoint
[19:10:29] getPlayerTime
[19:10:29] rawlen
[19:10:29] NO_TEAM
[19:10:29] KEY_LOOK_BEHIND
[19:10:29] getPVarString
[19:10:29] WEAPON_TEC9
[19:10:29] textDrawHideForPlayer
[19:10:29] WEAPON_M4
[19:10:29] DIALOG_STYLE_TABLIST
[19:10:29] WEAPON_UZI
[19:10:29] getPlayerPoolSize
[19:10:29] update3DTextLabelText
[19:10:29] forceClassSelection
[19:10:29] setObjectRot
[19:10:29] WEAPON_VIBRATOR
[19:10:29] disableNameTagLOS
[19:10:29] WEAPON_COLT45
[19:10:29] OBJECT_MATERIAL_TEXT_ALIGN_CENTER
[19:10:29] banPlayerEx
[19:10:29] attachObjectToPlayer
[19:10:29] setActorHealth
[19:10:29] WEAPON_AK47
[19:10:29] getObjectRot
[19:10:29] delete3DTextLabel
[19:10:29] gangZoneHideForPlayer
[19:10:29] textDrawFont
[19:10:29] WEAPON_FLOWER
[19:10:29] disableRemoteVehicleCollisions
[19:10:29] WEAPON_VIBRATOR2
[19:10:29] io
[19:10:29] textDrawBackgroundColor
[19:10:29] getPlayerAnimationIndex
[19:10:29] enableTirePopping
[19:10:29] playerSpectatePlayer
[19:10:29] WEAPON_KNIFE
[19:10:29] OBJECT_MATERIAL_SIZE_128x32
[19:10:29] MAX_PICKUPS
[19:10:29] editObject
[19:10:29] WEAPON_POOLSTICK
[19:10:29] textDrawAlignment
[19:10:29] getPlayerPing
[19:10:29] setObjectMaterialText
[19:10:29] package
[19:10:29] WEAPON_BRASSKNUCKLE
[19:10:29] togglePlayerControllable
[19:10:29] pcall
[19:10:29] PLAYER_MARKERS_MODE_STREAMED
[19:10:29] isPlayerInRaceCheckpoint
[19:10:29] isObjectMoving
[19:10:29] gangZoneFlashForPlayer
[19:10:29] KEY_ANALOG_LEFT
[19:10:29] PLAYER_STATE_ONFOOT
[19:10:29] next
[19:10:29] collectgarbage
[19:10:29] netStats_GetConnectedTime
[19:10:29] setObjectNoCameraCol
[19:10:29] WEAPON_TEARGAS
[19:10:29] DIALOG_STYLE_LIST
[19:10:29] textDrawSetPreviewRot
[19:10:29] removeVehicleComponent
[19:10:29] getServerVarAsBool
[19:10:29] banPlayer
[19:10:29] setTimer
[19:10:29] getPlayerWantedLevel
[19:10:29] textDrawSetSelectable
[19:10:29] ipairs
[19:10:29] gangZoneShowForPlayer
[19:10:29] isPlayerObjectMoving
[19:10:29] MAX_VEHICLES
[19:10:29] destroyPickup
[19:10:29] applyActorAnimation
[19:10:29] setmetatable
[19:10:29] MAX_TEXT_DRAWS
[19:10:29] INVALID_PLAYER_ID
[19:10:29] CARMODTYPE_WHEELS
[19:10:29] createExplosion
[19:10:29] MAX_ACTORS
[19:10:29] xpcall
[19:10:29] error
[19:10:29] netStats_MessagesRecvPerSecond
[19:10:29] setPlayerVirtualWorld
[19:10:29] connectNPC
[19:10:29] OBJECT_MATERIAL_TEXT_ALIGN_RIGHT
[19:10:29] playerTextDrawAlignment
[19:10:29] OBJECT_MATERIAL_SIZE_512x64
[19:10:29] create3DTextLabel
[19:10:29] setPlayerAmmo
[19:10:29] tocolor
[19:10:29] HTTP_ERROR_MALFORMED_RESPONSE
[19:10:29] KEY_LEFT
[19:10:29] setWeather
[19:10:29] showMenuForPlayer
[19:10:29] getVehicleZAngle
[19:10:29] usePlayerPedAnims
[19:10:29] playerTextDrawSetProportional
[19:10:29] getServerTickRate
[19:10:29] createPlayer3DTextLabel
[19:10:29] sendPlayerMessageToPlayer
[19:10:29] setGravity
[19:10:29] HTTP_GET
[19:10:29] showPlayerMarkers
[19:10:29] destroyObject
[19:10:29] rawequal
[19:10:29] selectTextDraw
[19:10:29] unBlockIpAddress
[19:10:29] startRecordingPlayerData
[19:10:29] playerSpectateVehicle
[19:10:29] enableStuntBonusForAll
[19:10:29] setSpawnInfo
[19:10:29] getServerVarAsInt
[19:10:29] isPlayerInCheckpoint
[19:10:29] kickPlayer
[19:10:29] isPlayerInAnyVehicle
[19:10:29] OBJECT_MATERIAL_SIZE_256x128
[19:10:29] gameModeExit
[19:10:29] resetPlayerWeapons
[19:10:29] getObjectPos
[19:10:29] removeBuildingForPlayer
[19:10:29] interpolateCameraPos
[19:10:29] stopPlayerObject
[19:10:29] DIALOG_STYLE_INPUT
[19:10:29] getPlayerCameraZoom
[19:10:29] gangZoneCreate
[19:10:29] playerTextDrawBoxColor
[19:10:29] setVehicleNumberPlate
[19:10:29] getVehicleComponentType
[19:10:29] setDeathDropAmount
[19:10:29] enablePlayerCameraTarget
[19:10:29] getPlayerCameraFrontVector
[19:10:29] getPlayerCameraPos
[19:10:29] setPlayerCameraPos
[19:10:29] setPlayerRaceCheckpoint
[19:10:29] setPlayerCheckpoint
[19:10:29] BULLET_HIT_TYPE_PLAYER_OBJECT
[19:10:29] netStats_PacketLossPercent
[19:10:29] playerPlaySound
[19:10:29] setTeamCount
[19:10:29] createPlayerObject
[19:10:29] CARMODTYPE_VENT_RIGHT
[19:10:29] HTTP_ERROR_CANT_WRITE
[19:10:29] getfenv
[19:10:29] playerTextDrawSetPreviewModel
[19:10:29] getPlayerArmour
[19:10:29] linkVehicleToInterior
[19:10:29] setfenv
[19:10:29] addPlayerClassEx
[19:10:29] setPVarString
[19:10:29] export
[19:10:29] WEAPON_BOMB
[19:10:29] isResourceRunning
[19:10:29] playerTextDrawSetPreviewRot
[19:10:29] playerTextDrawSetSelectable
[19:10:29] limitPlayerMarkerRadius
[19:10:29] setPlayerObjectMaterialText
[19:10:29] setPlayerArmour
[19:10:29] createMenu
[19:10:29] os
[19:10:29] setPlayerTime
[19:10:29] playerTextDrawTextSize
[19:10:29] playerTextDrawLetterSize
[19:10:29] netStats_ConnectionStatus
[19:10:29] setActorFacingAngle
[19:10:29] setPlayerFightingStyle
[19:10:29] setVehicleParamsCarWindows
[19:10:29] togglePlayerClock
[19:10:29] getPlayerIp
[19:10:29] KEY_WALK
[19:10:29] getPlayerHealth
[19:10:29] isValidObject
[19:10:29] getPlayerColor
[19:10:29] INVALID_TEXT_DRAW
[19:10:29] setPlayerHealth
[19:10:29] getActorPoolSize
[19:10:29] getActorFacingAngle
[19:10:29] deletePlayer3DTextLabel
[19:10:29] tonumber
[19:10:29] getPlayerVersion
[19:10:29] netStats_BytesReceived
[19:10:29] netStats_MessagesSent
[19:10:29] WEAPON_SHOVEL
[19:10:29] repairVehicle
[19:10:29] CLICK_SOURCE_SCOREBOARD
[19:10:29] playerTextDrawSetShadow
[19:10:29] gangZoneDestroy
[19:10:29] WEAPON_SILENCED
[19:10:29] gangZoneFlashForAll
[19:10:29] stopAudioStreamForPlayer
[19:10:29] changeVehicleColor
[19:10:29] textDrawDestroy
[19:10:29] enableVehicleFriendlyFire

Source:
Код:
addEventHandler("onScriptInit", function()
	for funcname in pairs(_G) do
		print(funcname);
	end
end)
Reply
#38

Quote:
Originally Posted by czop1223
Посмотреть сообщение
Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[00:23:32] 
[00:23:32] Server Plugins
[00:23:32] --------------
[00:23:32]  Loading plugin: lua_samp
[00:23:32]  Lua in SA-MP v0.2.4 by DrAkE successfully loaded.
[00:23:32]   Loaded.
[00:23:32]  Loaded 1 plugins.

[00:23:32] 
[00:23:32] Filterscripts
[00:23:32] ---------------
[00:23:32]   Loading filterscript 'rcon.amx'...
[00:23:32]   Loaded 1 filterscripts.

[00:23:32] Number of vehicle models: 0
Doesnt want to load it. Could you help?
Probably have to use "start resource_name" in the console. Like "start lvdm".
You can also edit base.pwn to look like:
Код:
#include <a_samp>

main(){}
public OnGameModeInit(){
	SetTimer("StartResource", 1000, false); // It's a timer because Lua hasn't loaded yet, give it a second.
	return true;
}

forward StartResource();
public StartResource() {
	SendRconCommand("start lvdm"); // Edit "lvdm" to the name of your resource.
	return true;
}
and compile.

For Drake1994:
My suggestion is to use a sampserver.config like in MTA (mtaserver.config) where you can change the server name, what resources load on start-up, and such.
Reply
#39

Maybe I forgot to mention (i thought i did it), but you can load scripts, and modules with server.cfg:
Код:
luascripts teszt
luamodules mta_mysql.dll
Reply
#40

Quote:
Originally Posted by Drake1994
Посмотреть сообщение
Maybe I forgot to mention (i thought i did it), but you can load scripts, and modules with server.cfg:
Код:
luascripts teszt
luamodules mta_mysql.dll
Thank you xD I wouldn't know, I scan read big threads.
If you want I can start-up a wiki for you, free, I like the project.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)