IIIIlllllIII Posted August 15, 2011 Posted August 15, 2011 hi i have a Question how i know the lua script for client or for server said i mean when i get some script from wiki and i dont know the script client or server when i put in meta.xml i dont know if this script for client and i dont know the script for the server how i know it and i have this script i dont know this for server said or client said function player_Wasted ( ammo, attacker, weapon, bodypart ) if ( attacker ) then local tempString if ( getElementType ( attacker ) == "player" ) then tempString = getPlayerName ( attacker ).." killed "..getPlayerName ( source ).." ("..getWeaponNameFromID ( weapon )..")" elseif ( getElementType ( attacker ) == "vehicle" ) then local tempString = getPlayerName ( getVehicleController ( attacker ) ).." killed "..getPlayerName ( source ).." ("..getWeaponNameFromID ( weapon )..")" end if ( bodypart == 9 ) then tempString = tempString.." (HEADSHOT!)" else tempString = tempString.." ("..getBodyPartName ( bodypart )..")" end outputChatBox ( tempString ) else outputChatBox ( getPlayerName ( source ).." died. ("..getWeaponNameFromID ( weapon )..") ("..getBodyPartName ( bodypart )..")" ) end end addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) client or server and how i know if the script client or server http://mojrm511.x10.mx msn: [email protected] my server ip: 176.9.40.71:22779 -------------------------------------- 2012 updated--------
Castillo Posted August 15, 2011 Posted August 15, 2011 That script is server-side. P.S: You can know if it's server or client because of the example color (when is client side, it'll be RED, else yellow). San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
MTA Team qaisjp Posted August 15, 2011 MTA Team Posted August 15, 2011 And use [xml][/xml] tags. or use: [/code] --Meh there should be [noparse]and [/noparse] [code=lua]--lots of shit here too!
TAPL Posted August 15, 2011 Posted August 15, 2011 you are just want copy and past wiki example? and put it on meta ? the wiki example some time not work because it's just example
JR10 Posted August 15, 2011 Posted August 15, 2011 Lol, why wouldn't it work. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
BinSlayer1 Posted August 15, 2011 Posted August 15, 2011 because wiki examples usually assume you know how to implement them in your own code (therefore sometimes wiki examples only contain 1 defined function or so)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now