Guest Posted December 2, 2007 Posted December 2, 2007 I need help with this script I made i dont get the errors messages but here it go thx again addEventHandler ( "onPlayerJoin", "onPlayerJoin" ) function onPlayerJoin ( id ) sendMessage ( id, "Welcome to Red's Rpg Most of the scripts are in lua" ) end function iif ( cond, arg1, arg2 ) if ( cond ) then return arg1 end return arg2 end addEventHandler ( "onPlayerChat", "onPlayerChat" ) function onPlayerChat ( id, text ) local command = gettok ( text, 0, " " ) local player = iif ( gettok ( text, 1, " " ), getPlayer ( gettok ( text, 1, " " ) ), id ) if ( command == "!info" ) then sendChat ( "Red's Basic Lua Rpg Script" ) elseif ( command == "!drugs" ) then sendChat ( "The list of drugs are: Coke,Heroin,weed," ) elseif ( command == "!buycoke" ) then sendChat ( getPlayerName ( player ) "Has just bought coke" ) elseif ( command == "!buyheroin" ) then sendChat ( getPlayerName ( player ) "Has just bought Heroin" ) elseif ( command == "!buyweed" ) then sendChat ( getPlayerName ( player ) "Has just bought weed" ) end end end addEventHandler ( "onAdminChat", "onAdminChat" ) function onAdminChat ( id, text ) local command = gettok ( text, 0, " " ) local player = iif ( gettok ( text, 1, " " ), getPlayer ( gettok ( text, 1, " " ) ), id ) if ( command == "!slap" ) then sendChat ( slapPlayer ( id ) "You have been slapped by an admin" ) end end
SanZoR Posted December 2, 2007 Posted December 2, 2007 This is not place for LUA scripting... Please post this to proper place.
norby89 Posted December 2, 2007 Posted December 2, 2007 This is not place for LUA scripting... Please post this to proper place. why not? the other section is for scripting in MTA:SA, this one is VC afaik
lil Toady Posted December 2, 2007 Posted December 2, 2007 This is not place for LUA scripting... Please post this to proper place. This is right the place.. Where does it say this is only for mirc scripts?... addEventHandler ( "onPlayerJoin", "onPlayerJoin" ) function onPlayerJoin ( id ) sendMessage ( id, "Welcome to Red's Rpg Most of the scripts are in lua" ) end function iif ( cond, arg1, arg2 ) if ( cond ) then return arg1 end return arg2 end addEventHandler ( "onPlayerChat", "onPlayerChat" ) function onPlayerChat ( id, text ) local command = gettok ( text, 0, " " ) local player = iif ( gettok ( text, 1, " " ), getPlayer ( gettok ( text, 1, " " ) ), id ) if ( command == "!info" ) then sendChat ( "Red's Basic Lua Rpg Script" ) elseif ( command == "!drugs" ) then sendChat ( "The list of drugs are: Coke,Heroin,weed," ) elseif ( command == "!buycoke" ) then sendChat ( getPlayerName ( player ) "Has just bought coke" ) elseif ( command == "!buyheroin" ) then sendChat ( getPlayerName ( player ) "Has just bought Heroin" ) elseif ( command == "!buyweed" ) then sendChat ( getPlayerName ( player ) "Has just bought weed" ) end end addEventHandler ( "onAdminChat", "onAdminChat" ) function onAdminChat ( id, text ) local command = gettok ( text, 0, " " ) local player = iif ( gettok ( text, 1, " " ), getPlayer ( gettok ( text, 1, " " ) ), id ) if ( command == "!slap" ) then sendChat ( slapPlayer ( id ) "You have been slapped by an admin" ) end end looks like you're interested in the thing, will release an update today or tomorrow, have some things fixed.
kevuwk Posted December 3, 2007 Posted December 3, 2007 This is not place for LUA scripting... Please post this to proper place. This is right the place.. Where does it say this is only for mirc scripts?... the actual place for lua scripts is the scripting section under MTA:San Andreas, this is a section for add-ons, i.e. mIRC scripting, lua scripting is built into MTA so it has its own section
norby89 Posted December 3, 2007 Posted December 3, 2007 yea but this script is for Toady's Lua Admin found here: viewtopic.php?f=30&t=20536 it doesn't have to do with MTA:DM's Lua scripting
Recommended Posts