IIIIlllllIII Posted August 15, 2011 Share 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 Link to comment
Castillo Posted August 15, 2011 Share 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). Link to comment
qaisjp Posted August 15, 2011 Share 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! Link to comment
TAPL Posted August 15, 2011 Share 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 Link to comment
BinSlayer1 Posted August 15, 2011 Share 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) Link to comment
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