Guest Posted December 2, 2007 Share 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 Link to comment
SanZoR Posted December 2, 2007 Share Posted December 2, 2007 This is not place for LUA scripting... Please post this to proper place. Link to comment
norby89 Posted December 2, 2007 Share 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 Link to comment
lil Toady Posted December 2, 2007 Share 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. Link to comment
Guest Posted December 2, 2007 Share Posted December 2, 2007 Thx again Lil Toady you are a big help. Link to comment
kevuwk Posted December 3, 2007 Share 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 Link to comment
norby89 Posted December 3, 2007 Share 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 Link to comment
lil Toady Posted December 3, 2007 Share Posted December 3, 2007 /slap Kevuwk that's not mtasa dm lua! Link to comment
Recommended Posts