Jump to content

#RooTs

Members
  • Posts

    1,990
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by #RooTs

  1. #RooTs

    onPlayerWasted

    anyway, you need to save data when you die
  2. #RooTs

    onPlayerWasted

    when you die, you can sit in sql data not to lose the spawn onPlayerWasted = setPlayerData (source, "userinfo","userweapon_"..i,getPedWeapon(source,i) ) setPlayerData(source,"userinfo","userammo_"..i,getPedTotalAmmo(source,i)) onPlayerLogin = getPlayerData or remove line in event "onPlayerWasted" if isPedDead(source) then return end
  3. #RooTs

    onPlayerWasted

    add more functions Example -- dead and diad addEventHandler ("onPlayerWasted",root, function() if isPedDead(source) then return end local id = getPlayerData (source,"userinfo","userid") local x,y,z = getElementPosition(source) local r,g,b = source:getNametagColor() local int,dim = getElementInterior(source),getElementDimension(source) local money,bank = source:getMoney(), getPlayerData (source,"userinfo","userbank") local skin = getElementModel(source) sql.Exec ("UPDATE userinfo SET userX = ?, userY = ?, userZ = ?, userR = ?, userG = ?, userB = ?,userskin= ?, userdim = ?, userint = ?, usermoney = ?, userbank =?, userfirstjoin = ? WHERE userid = ? ",x,y,z,r,g,b,skin,int,dim,money,bank,0,id) for i = 1 , 12 do setPlayerData (source, "userinfo","userweapon_"..i,getPedWeapon(source,i) ) setPlayerData(source,"userinfo","userammo_"..i,getPedTotalAmmo(source,i)) end end ) -- login addEventHandler ("onPlayerLogin",root, function() local weapon = {} local wep,ammo = {},{} local data_weapon,data_ammo = {},{} for i = 1, 12 do data_weapon[i], data_ammo[i] = tonumber (getPlayerData (source,"userinfo","userweapon_"..i)),tonumber(getPlayerData (source,"userinfo","userammo_"..i)) wep[i],ammo[i] = data_weapon[i], data_ammo[i] giveWeapon (source,wep[i],ammo[i]) end end )
  4. #RooTs

    onPlayerWasted

    show me all your code
  5. LOLLLL he delete posts? then he does not deserve anyone's help
  6. I had already tested the his first example in first post. this will work? @n3wage, I will test your sample also
  7. my function not work local AllOccupant = {0,1,2,3,4} local check = 0 for _, v in ipairs (AllOccupant) do car = getPedOccupiedVehicle(player) check = check + getVehicleOccupant (car,v) end dxDrawText(check.....) someone help me ?
  8. what is the correct function, to pull all occupants in one number? getVehicleOccupant -- or getVehicleOccupants the example that I made is the right job? Code Removed
  9. friends or @MrTasty, is possible create a table to pull all Occupants the vehicle Example Code Removed that will work ?
  10. try this outputChatBox(getPlayerName(player).." give "..amount.." to "..getPlayerName(targetplayer), getRootElement(), 0, 165, 0, true)
  11. @Droam|Oussez. please, not create other topic with the same subject
  12. Hello guys, there is already a discussion about it. please. closed, one of the topics https://forum.multitheftauto.com/viewtopic.php?f=91&t=95000
  13. Original: https://community.multitheftauto.com/ind ... ls&id=1868 Stolen: https://community.multitheftauto.com/ind ... ls&id=7098 DONE
  14. @Revolt, thanks, I added more events server.lua addEventHandler ( 'onPlayerLogin', getRootElement ( ), function () triggerClientEvent ( source, "onClientPlayerLogin", resourceRoot ) end ) addEventHandler ( 'onPlayerLogout', getRootElement ( ), function () triggerClientEvent ( source, "onClientPlayerLogout", resourceRoot ) end ) client.lua addEvent( "onClientPlayerLogin", true ) addEventHandler( "onClientPlayerLogin", resourceRoot, function() bindKey( "F3", "down", toggleState ) addEventHandler("onClientRender",getRootElement(),renderLoginMessages) botoes() end ) function removeEvent() unbindKey( "F3", "down", toggleState ) removeEventHandler("onClientRender",getRootElement(),renderLoginMessages) botoes() end addEvent( "onClientPlayerLogout", true ) addEventHandler( "onClientPlayerLogout", resourceRoot, removeEvent ) addEventHandler( "onClientPlayerQuit", resourceRoot, removeEvent ) something wrong in your view?
  15. What is wrong ?..... has no errors in debug server.lua addEventHandler ( 'onPlayerLogin', getRootElement ( ), function () triggerClientEvent ( source, "onClientPlayerLogin", source ) -- I've tried in (thePlayer) and (playerSource) I did not succeed end ) client.lua addEvent( "onClientPlayerLogin", true ) addEventHandler( "onClientPlayerLogin", resourceRoot, function() bindKey( "F3", "down", toggleState ) addEventHandler("onClientRender",getRootElement(),renderLoginMessages) botoes() end )
  16. skin. mod txd and dff https://community.multitheftauto.com/ind ... s&id=12437 https://community.multitheftauto.com/ind ... s&id=12413 DONE
×
×
  • Create New...