-
Posts
814 -
Joined
-
Last visited
Everything posted by Wei
-
last problem today. It doesn't work. Shows empty exports [ 'scoreboard' ]:addScoreboardColumn ( 'Group' ) addEventHandler ( "onPlayerChat", root, function ( _, thePlayer ) local theSkin = getElementModel ( thePlayer ) if ( theSkin == 217 ) then sGroup = "Admin" elseif ( theSkin == 1 ) then sGroup = "Guest" end setElementData ( thePlayer, 'Group', sGroup ) end )
-
whats the problem here ... CODE: function spawnmepolice ( thePlayer ) setPlayerTeam ( thePlayer, police ) setPlayerNametagColor ( thePlayer, 0, 0, 205 ) setElementModel ( thePlayer, 281 ) giveWeapon ( thePlayer, 3, 10000 ) outputChatBox ( "*INFO: You are now employed as Police Officer", thePlayer, 255, 255, 0 ) end addEventHandler("onPlayerMarkerHit", policemarker, spawnmepolice ) It doesn't spawn me in Police. No errors anywhere
-
Why is allways marker so up from floor ? Picture : EDIT: CODE: createMarker ( 1177.53137, -1319.97766, 14.07530, "cylinder", 1, 255, 255, 0, 170 )
-
addCommandHandler ( 'aj', function ( sCommand, uTarget, nTime ) if ( isStaff ( localPlayer ) ) then nTime = nTime * 60 * 1000 local target = getPlayerFromName ( uTarget ); setElementInterior ( target, 6 ); setElementPosition ( target, 265.21185302734, 77.63591003418, 1001.0390625 ); setTimer ( function ( uTarget ) setElementPosition ( uTarget, 1546.20203, -1675.47412, 13.56186 ); setElementInterior ( uTarget, 0 ); end, nTime, 1, target ) outputChatBox ( 'You have been jailed!', target, 255, 255, 0 ); outputChatBox ( 'INFO: ' .. getPlayerName ( target ) .. ' has been jailed for 5 minutes by Admin.', root, 255, 255, 0 ); outputDebugString ( getPlayerName ( target ) .. ' has been jailed!' ); else outputChatBox ( 'Acess denied to the command!', localPlayer, 255, 255, 0 ); end end ) addCommandHandler ( 'auj', function ( sCommand, uTarget ) if ( isStaff ( localPlayer ) ) then local target = getPlayerFromName ( uTarget ); setElementInterior ( target, 0 ); setElementPosition ( target, 1546.20203, -1675.47412, 13.56186 ); outputChatBox ( 'You have been unjailed!', target, 255, 255, 0 ); else outputChatBox ( 'Acess denied to the command!', localPlayer, 255, 255, 0 ) end end ) isStaff = function ( thePlayer ) team = getPlayerTeam(localPlayer) if team == getTeamFromName("Staff") then return true; else return false; end end Why doesn't work color for text ?
-
isStaff = function ( thePlayer ) team = getPlayerTeam(localPlayer) if team == getTeamFromName("Staff") then return true; else return false; end end It works for jail...
-
What's the problem here ? addCommandHandler ( 'aaa', function ( sCommand, thePlayer ) if ( isStaff ( thePlayer ) ) then outputChatBox ( 'ADMIN HELP HERE', thePlayer, 193, 13, 13 ); outputChatBox ( 'ADMIN HELP HERE', thePlayer, 193, 13, 13 ); outputChatBox ( 'ADMIN HELP HERE', thePlayer, 193, 13, 13 ); outputChatBox ( 'ADMIN HELP HERE', thePlayer, 193, 13, 13 ); outputChatBox ( 'ADMIN HELP HERE', thePlayer, 193, 13, 13 ); outputChatBox ( 'ADMIN HELP HERE', thePlayer, 193, 13, 13 ); else outputChatBox ( 'Acess denied!', localPlayer, 193, 13, 13 ) end end ) WARNING: shit\afk.lua:33: Bad argument @ 'getPlayerTeam' It says access denied
-
works fine... but normal world interior id is 0 THANK YOU !
-
How can I make now that will teleport me out of interrior ?
-
It says access denied! CODE: function jailBastard(localPlayer, commandName, jailTar) local Bastard = getPlayerFromName(jailTarget) if isStaff(localPlayer) then local Bastardz = getPlayerName(jailTar) setElementInterior ( Bastard, 6 ) setElementPosition (Bastard, 265.21185302734, 77.63591003418, 1001.0390625) setTimer ( setElementPosition, 300000, 1, Bastard, 268.03460693359, 77.43824005127, 1001.03906) outputChatBox ( "You have been jailed !", theNoob, 193, 13, 13 ) outputChatBox ( INFO: getPlayerName(theNoob).." has been jailed for 5 minutes by Admin.", getRootElement(), 255, 0, 0 ) outputDebugString ( getPlayerName(theNoob).." has been jailed !" ) else outputChatBox ("Access denied", localPlayer, 193, 13, 13) end end function unJail (localPlayer, commandName, jailTar) local Bastard = getPlayerFromName(jailTarget) if isStaff(localPlayer) then setElementInterior ( Bastard, 6) setElementPosition ( Bastard, 268.03460693359, 77.43824005127, 1001.03906) outputChatBox ("You have been unjailed !", theNoob, 193, 13, 13) else outputChatBox ("Access denied !", localPlayer, 193, 13, 13) end end addCommandHandler("aj", jailBastard ) addCommandHandler("auj", unJail ) function isStaff(player) team = getPlayerTeam(localPlayer) if team == getTeamFromName("Staff") then return true end end Thanks
-
Don't wory... they're just angry because you are better than them !
-
It works. Thanks man. What do you think on witch handler sould i make it ? On timer ?