Jump to content

iMr.3a[Z]eF

Members
  • Posts

    862
  • Joined

  • Last visited

Everything posted by iMr.3a[Z]eF

  1. do you mean you want to add items in your server?
  2. its simple -- Event "onVehicleDamage" -- Function FixVehicle
  3. dude tell me what you need to scripting?
  4. @ Gtakiki : Is every thing else happning and only the team is what not working ? i think its all works but, he hitted the marker then he didn't became in the team. EDIT: and this is from the wiki why should i have to use getTeamFromName function assignNewTeam ( source, commandName, teamName ) local theTeam = createTeam ( teamName ) -- create a new team with the specified name if theTeam then -- if it was successfully created setPlayerTeam ( source, theTeam ) -- add the player to the new team end end addCommandHandler ( "gimmeateam", assignNewTeam ) function unassignTeam ( source, commandName ) local theTeam = getPlayerTeam ( source ) -- Check if the player is on a team if theTeam then -- this player is on a team, so we can remove them from it setPlayerTeam ( source, nil ) -- remove the player from the current team end end addCommandHandler ( "takeawaymyteam", unassignTeam )
  5. so like this, right? ma = createMarker (x,y,z, "cylinder", 4, 0, 0, 255, 225 ) addEventHandler("onMarkerHit",ma, function ( player ) if getElementType(player) == "player" then outputChatBox("Take it", player, 255, 255, 0, true) end end )
  6. why trigger? ma = createMarker (x,y,z, "cylinder", 4, 0, 0, 255, 225 ) addEventHandler("onMarkerHit",ma, function ( player ) outputChatBox("Take it", player, 255, 255, 0, true) end )
  7. try now function createCriminalTeam( ) Criminalteam = createTeam( "Criminal", 255, 0, 0 ) end addEventHandler( "onResourceStart", resourceRoot, createCriminalTeam ) addEvent( "enterCriminalJob", true ) function setPlayerCriminal( thePlayer ) if getElementType( thePlayer ) == "player" then local playerID = exports.server:playerID( thePlayer ) local oldTeam = getPlayerTeam( thePlayer ) local playerData = exports.DENmysql:querySingle( "SELECT * FROM accounts WHERE id=? LIMIT 1", playerID ) if ( playerData ) then setElementData( thePlayer, "Occupation", "Criminal", true ) setPlayerTeam( thePlayer, "Criminal" ) setElementModel( thePlayer, tonumber( playerData.skin ) ) if ( tonumber( playerData.skin ) == 0 ) then local CJCLOTTable = fromJSON( tostring( playerData.cjskin ) ) if CJCLOTTable then for theType, index in pairs( CJCLOTTable ) do local texture, model = getClothesByTypeIndex( theType, index ) addPedClothes( thePlayer, texture, model, theType ) end end end if ( getTeamName( oldTeam ) ~= "Criminal" ) then triggerEvent( "onPlayerTeamChange", thePlayer, oldTeam, getTeamFromName( "Criminal" ) ) end triggerEvent( "onPlayerJobChange", thePlayer, "Criminal", getTeamFromName( "Criminal" ) ) exports.CPTvehicles:reloadFreeVehicleMarkers( thePlayer, true ) exports.CPThelp:createNewHelpMessageForPlayer( thePlayer, "You are now a criminal!", 200, 0, 0 ) return true else return false end end end addEventHandler( "enterCriminalJob", root, setPlayerCriminal ) function givePlayerCJClothes( thePlayer ) local playerID = exports.server:playerID( thePlayer ) local playerData = exports.DENmysql:querySingle( "SELECT * FROM accounts WHERE id=? LIMIT 1", playerID ) if ( playerData ) then setElementModel( thePlayer, 0 ) local CJCLOTTable = fromJSON( tostring( playerData.cjskin ) ) if CJCLOTTable then for theType, index in pairs( CJCLOTTable ) do local texture, model = getClothesByTypeIndex( theType, index ) addPedClothes( thePlayer, texture, model, theType ) end end return true else return false end end
  8. i forget to dellete "S"
  9. like this right? function createCriminalTeam () Criminalteam = createTeam ("Criminal", 255, 0, 0) end addEventHandler ("onResourceStart", resourceRoot, createCriminalTeam) addEvent ( "enterCriminalJob", true ) function setPlayerCriminal ( thePlayer ) if getElementType(thePlayer) == "player" then local playerID = exports.server:playerID( thePlayer ) local oldTeam = getPlayerTeam( thePlayer ) local playerData = exports.DENmysql:querySingle( "SELECT * FROM accounts WHERE id=? LIMIT 1", playerID ) if ( playerData ) then setElementData( thePlayer, "Occupation", "Criminal", true ) setPlayerTeam ( thePlayer, getTeamFromName ("Criminals") ) setElementModel ( thePlayer, tonumber( playerData.skin ) ) if ( tonumber( playerData.skin ) == 0 ) then local CJCLOTTable = fromJSON( tostring( playerData.cjskin ) ) if CJCLOTTable then for theType, index in pairs( CJCLOTTable ) do local texture, model = getClothesByTypeIndex ( theType, index ) addPedClothes ( thePlayer, texture, model, theType ) end end end if ( getTeamName( oldTeam ) ~= "Criminals" ) then triggerEvent( "onPlayerTeamChange", thePlayer, oldTeam, getTeamFromName ( "Criminals" ) ) end triggerEvent( "onPlayerJobChange", thePlayer, "Criminal", getTeamFromName ( "Criminals" ) ) exports.CPTvehicles:reloadFreeVehicleMarkers( thePlayer, true ) exports.CPThelp:createNewHelpMessageForPlayer( thePlayer, "You are now a criminal!", 200, 0, 0 ) return true else return false end end addEventHandler ( "enterCriminalJob", root, setPlayerCriminal ) function givePlayerCJClothes ( thePlayer ) local playerID = exports.server:playerID( thePlayer ) local playerData = exports.DENmysql:querySingle( "SELECT * FROM accounts WHERE id=? LIMIT 1", playerID ) if ( playerData ) then setElementModel ( thePlayer, 0 ) local CJCLOTTable = fromJSON( tostring( playerData.cjskin ) ) if CJCLOTTable then for theType, index in pairs( CJCLOTTable ) do local texture, model = getClothesByTypeIndex ( theType, index ) addPedClothes ( thePlayer, texture, model, theType ) end end return true else return false end end
  10. اخوي انا سويت مثل كذا بس ما ضبط معي شف وش سويت Server Side ! AboShanab = createMarker( -3390.3999023438, -3006.5, 45.900001525879, "cylinder", 100, 255, 255, 255) addEventHandler("onMarkerHit",AboShanab, function (hitPlayer) if getElementType ( hitPlayer ) == "player" and not isPedInVehicle ( hitPlayer ) then vehicle = createVehicle(602, 545, 496, 517, 401, 410, 518, 600, 527, 436, 589, 580, 419, 439, 533, 549, 526, 491, 474, 445, 467, 604, 426, 507, 547, 585, 405, 587, 409, 466, 550, 492, 566, 546, 540, 551, 421, 516, 529, 592, 553, 577, 488, 511, 497, 548, 563, 512, 476, 593, 447, 425, 519, 520, 460, 417, 469, 487, 513, 581, 510, 509, 522, 481, 461, 462, 448, 521, 468, 463, 586, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 485, 552, 431, 438, 437, 574, 420, 525, 408, 416, 596, 433, 597, 427, 599, 490, 432, 528, 601, 407, 428, 544, 523, 470, 598, 499, 588, 609, 403, 498, 514, 524, 423, 532, 414, 578, 443, 486, 515, 406, 531, 573, 456, 455, 459, 543, 422, 583, 482, 478, 605, 554, 530, 418, 572, 582, 413, 440, 536, 575, 534, 567, 535, 576, 412, 402, 542, 603, 475, 449, 537, 538, 441, 464, 501, 465, 564, 568, 557, 424, 471, 504, 495, 457, 539, 483, 508, 571, 500, 444, 556, 429, 411, 541, 559, 415, 561, 480, 560, 562, 506, 565, 451, 434, 558, 494, 555, 502, 477, 503, 579, 400, 404, 489, 505, 479, 442, 458, 606, 607, 610, 590, 569, 611, 584, 608, 435, 450, 591, 594,-3059.1,-3005.1,5) warpPedIntoVehicle (hitPlayer , vehicle) end end )
  11. يخوي لا ترفع المواضيع القديمة
  12. دامكـ مبرمج ليه تعطيه اكواد خطأ ؟ طيب شف هالكود من الويكي بلحمه ودمه, وعدلته ذذ -- get team name local allTeams = getTeamFromName ( "Gang" ) for index, theTeam in ipairs(allTeams) do -- if friendly fire is off, if ( getTeamFriendlyFire ( theTeam ) == false ) then -- switch it on setTeamFriendlyFire ( theTeam, true ) end end وش الفرق بين ذا وذاك؟
  13. ذا بلاير ماله دخل بتعريف الفنكشن خله كذا غلط -_-" الي ما يعرف يبرمج لا يساعد يرحم امكم ههههههه هذا كله ما أعرف أبرمج؟
  14. ذا بلاير ماله دخل بتعريف الفنكشن خله كذا local Team = createTeam("Army",0,255,0) addEventHandler("onResourceStart", resourceRoot, function() if ( getTeamFriendlyFire ( Team ) == false ) then setTeamFriendlyFire ( Team, true ) end end )
  15. اخوي انا سويت مثل كذا بس ما ضبط معي شف وش سويت Server Side ! AboShanab = createMarker( -3390.3999023438, -3006.5, 45.900001525879, "cylinder", 100, 255, 255, 255) addEventHandler("onMarkerHit",AboShanab, function (hitPlayer) if getElementType ( hitPlayer ) == "player" and not isPedInVehicle ( hitPlayer ) then vehicle = createVehicle(602, 545, 496, 517, 401, 410, 518, 600, 527, 436, 589, 580, 419, 439, 533, 549, 526, 491, 474, 445, 467, 604, 426, 507, 547, 585, 405, 587, 409, 466, 550, 492, 566, 546, 540, 551, 421, 516, 529, 592, 553, 577, 488, 511, 497, 548, 563, 512, 476, 593, 447, 425, 519, 520, 460, 417, 469, 487, 513, 581, 510, 509, 522, 481, 461, 462, 448, 521, 468, 463, 586, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 485, 552, 431, 438, 437, 574, 420, 525, 408, 416, 596, 433, 597, 427, 599, 490, 432, 528, 601, 407, 428, 544, 523, 470, 598, 499, 588, 609, 403, 498, 514, 524, 423, 532, 414, 578, 443, 486, 515, 406, 531, 573, 456, 455, 459, 543, 422, 583, 482, 478, 605, 554, 530, 418, 572, 582, 413, 440, 536, 575, 534, 567, 535, 576, 412, 402, 542, 603, 475, 449, 537, 538, 441, 464, 501, 465, 564, 568, 557, 424, 471, 504, 495, 457, 539, 483, 508, 571, 500, 444, 556, 429, 411, 541, 559, 415, 561, 480, 560, 562, 506, 565, 451, 434, 558, 494, 555, 502, 477, 503, 579, 400, 404, 489, 505, 479, 442, 458, 606, 607, 610, 590, 569, 611, 584, 608, 435, 450, 591, 594,-3059.1,-3005.1,5) warpPedIntoVehicle (hitPlayer , vehicle) end end ) وش سويت يبوي ضض لازم تسويه كلن على حدهـ سويها بآيدي واحد مو مليون ذذ
  16. ^^^^ function randomVehColors() local vehicle = getPedOccupiedVehicle(localPlayer) if (vehicle) then local color = {} color[1] = math.random(0,255) color[2] = math.random(0,255) color[3] = math.random(0,255) color[4] = math.random(0,255) setVehicleColor ( vehicle, color[1], color[2], color[3], color[4] ) end end addEventHandler ( "onClientGUIClick", RianbowColor,function () setTimer( randomVehColors, 350, 0 ) end,false) الحين جرب تم التعديل * أسف اسف الحين عدلت جرب ذذذذ
  17. مآ نفع شوف ردي فوق A boolean denoting whether friendly fire is on (true) or off (false).
  18. خله كذا طيب ذذ زي اول function randomVehColors() for i, car in ipairs( getElementsByType( "vehicle" ) ) do local color = {} color[1] = math.random(0,255) color[2] = math.random(0,255) color[3] = math.random(0,255) color[4] = math.random(0,255) setVehicleColor ( car, color[1], color[2], color[3], color[4] ) end end addEventHandler ( "onClientGUIClick", RianbowColor,function () setTimer( randomVehColors, 350, 0 ) end,false)
  19. زي ما قال ضاوي حاول تتعلم بنفسك ذذ وزي ما قال triggerServerEvent--نقل للسيرفر getPlayerMoney----يجيب كم عدد فلوس اللاعب takePlayerMoney-------سحب فلوسه
  20. outputChatBox function randomVehColors() for i, car in ipairs( getElementsByType( "vehicle" ) ) do local color = {} color[1] = math.random(0,255) color[2] = math.random(0,255) color[3] = math.random(0,255) color[4] = math.random(0,255) setVehicleColor ( car, color[1], color[2], color[3], color[4] ) end end addEventHandler ( "onClientGUIClick", RianbowColor,function (player) local money = getPlayerMoney(thePlayer) if (money > 800) then takePlayerMoney ( player, 800 ) setTimer( randomVehColors, 350, 0 ) else killTimer( randomVehColors ) outputChatBox("* You dont have enough money",player,255,0,0) end end,false) مشكور ع التنبيه ذذ
  21. خله يعتمد شوي على نفسه ويسوي الكود احنا ما سوينا له الكودات اللي فوق؟ وأبششر أخليه يعتمد على نفسه المرهـ الثانية
  22. function randomVehColors() for i, car in ipairs( getElementsByType( "vehicle" ) ) do local color = {} color[1] = math.random(0,255) color[2] = math.random(0,255) color[3] = math.random(0,255) color[4] = math.random(0,255) setVehicleColor ( car, color[1], color[2], color[3], color[4] ) end end addEventHandler ( "onClientGUIClick", RianbowColor,function (player) local money = getPlayerMoney(thePlayer) if (money > 800) then takePlayerMoney ( player, 800 ) setTimer( randomVehColors, 350, 0 ) else killTimer( randomVehColors ) outputchatbox("* You dont have enough money",player,255,0,0) end end,false)
  23. function randomVehColors() for i, car in ipairs( getElementsByType( "vehicle" ) ) do local color = {} color[1] = math.random(0,255) color[2] = math.random(0,255) color[3] = math.random(0,255) color[4] = math.random(0,255) setVehicleColor ( car, color[1], color[2], color[3], color[4] ) end end setTimer( randomVehColors, 350, 0 ) addEventHandler ( "onClientGUIClick", Button, randomVehColours ) غلطت في حرف تم التعديل
  24. Hello segitségre lenne szükséged? Ha szüksége van a segítség miért nem küldd el az Ön nyelvén részben? i love google translate
×
×
  • Create New...