MisterQuestions Posted November 9, 2014 Posted November 9, 2014 Hey i maked this simple script, but whats wrong?? function PartyMode() setSkyGradient ( math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255) ) end function StartParty() if isPlayerInACLGroup(player, g_GameOptions.admingroup) then outputChatBox("#ff0000[#0088ffPARTY#ff9e00]#ff0000APS #0000FFparty #ff9e00 mode #00ff00ON#ff9e00!", 255, 255, 255, true) pTimer = setTimer ( PartyMode, 100, 0 ) else outputChatBox("#ff0000[#0088ffPARTY#ff9e00]#ffffffFailed at party start!", 255, 255, 255, true) end end addCommandHandler("party", PartyMode) function StopParty() killTimer( pTimer ) outputChatBox("#ff0000[#0088ffPARTY#ff9e00]#ffffffParty Finished !!", 255, 255, 255, true) end addCommandHandler("sparty", StopParty)
Enargy, Posted November 9, 2014 Posted November 9, 2014 'isPlayerInACLGroup' is not defined. if it is for server side use isObjectInACLGroup
MisterQuestions Posted November 9, 2014 Author Posted November 9, 2014 Changed but doesn't work! Client-Side function PartyMode() setSkyGradient ( math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255) ) end function StartParty() pTimer = setTimer ( PartyMode, 100, 0 ) end addEvent("onPartyStart", true) addEventHandler("onPartyStart", getRootElement(), StartParty) function StopParty() killTimer( pTimer ) end addEvent("onPartyStop", true) addEventHandler("onPartyStop", getRootElement(), StopParty) Server-Side function StartParty() if isPlayerInACLGroup(player, g_GameOptions.admingroup) then outputChatBox("#ff0000[#0088ffPARTY#ff9e00]#ff0000APS #0000FFparty #ff9e00 mode #00ff00ON#ff9e00!", 255, 255, 255, true) triggerClientEvent( "onPartyStart", getRootElement() ) else outputChatBox("#ff0000[#0088ffPARTY#ff9e00]#ffffffFailed at party start!", 255, 255, 255, true) end end addCommandHandler("party", PartyMode) function StopParty() triggerClientEvent( "onPartyStop", getRootElement() ) outputChatBox("#ff0000[#0088ffPARTY#ff9e00]#ffffffParty mode #ff0000Off!#ffffff.", 255, 255, 255, true) end addCommandHandler("sparty", StopParty)
TAPL Posted November 9, 2014 Posted November 9, 2014 Where is function isPlayerInACLGroup? And where player and g_GameOptions.admingroup defined? Also server side outputChatBox require player argument.
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