Jump to content

#Paper

Members
  • Posts

    568
  • Joined

  • Last visited

Everything posted by #Paper

  1. #Paper

    Name

    It's hard to script... i can sell you this script for 15€ I have it in my server: International Racing Server
  2. #Paper

    addStat()

    Thanks bro! But can you explain why mine version doesn't works?
  3. #Paper

    addStat()

    yes... i trigger the onPlayerWins() func by the race gm... and then i trigger the addStat func
  4. #Paper

    addStat()

    there aren't any error... but the scoreboard still be to 0... doesn't change
  5. #Paper

    addStat()

    may be this? function onPlayerWins(player) local players = getPlayerCount() local points = players * 1.3 local cash = players * 7 addStat(source, points, points) addStat(source, cash, cash) end no... the "player" variable is the right...
  6. #Paper

    addStat()

    In the debugscript there isn't any error... And the stat doesn't set in the scoreboard... function addStat(thePlayer, theStat, theValue) local getActualPoints = getElementData(thePlayer, "Points") local getActualCash = getElementData(thePlayer, "Cash") if theStat == cash then setElementData(thePlayer, "Cash", getActualCash + theValue) elseif theStat == points then setElementData(thePlayer, "Points", getActualPoints + theValue) end end function onPlayerWins(player) local players = getPlayerCount() local points = players * 1.3 local cash = players * 7 addStat(thePlayer, points, points) addStat(thePlayer, cash, cash) end
  7. #Paper

    Tables

    Ok, thanks, i fixxed
  8. #Paper

    Tables

    The forCicles() return stranges content (table: 11VBBA201R or similiar) questList = { {"Car Stealer", "Stole 1 car", 1, 200}, {"Bike Stealer", "Stole 1 bike", 1, 200}, {"Killing <3", "Kill 10 peds", 1, 500}, {"Killing FTW!", "Kill 100 peds", 1, 800}, {"Killing 4 life", "Kill 1000 peds", 2, 1000}, {"I <3 this server", "Reconnect!", 1, 10}, --{"I really <3 this server!", "Bring 5 players", 5, 5000}, {"Medal Man", "Get 50 medals!", 0, 0}, } function forCicles() guiGridListClear (GUIEditor_Grid[1]) for name,desc,medals,cash in ipairs(questList) do row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, qName, tostring(name), false, false ) guiGridListSetItemText ( GUIEditor_Grid[1], row, qDesc, tostring(desc), false, false ) guiGridListSetItemText ( GUIEditor_Grid[1], row, qMedals, medals, false, true ) guiGridListSetItemText ( GUIEditor_Grid[1], row, qCash, cash, false, true ) guiGridListAutoSizeColumn( GUIEditor_Grid[1], qName ) guiGridListAutoSizeColumn( GUIEditor_Grid[1], qDesc ) guiGridListAutoSizeColumn( GUIEditor_Grid[1], qMedals ) guiGridListAutoSizeColumn( GUIEditor_Grid[1], qCash ) end end
  9. There is the contry script integrated in the admin res... check it
  10. #Paper

    Money Trasfer

    The script can't retrieve the player: " -----------SERVER SIDE function trasferMoney(theReicivitor, theInviator, amount) local target = tostring(theReicivitor) local account = getPlayerAccount(theInviator) if not (isGuestAccount(account)) then if (target) then if (amount) then local targetPlayer = getPlayerFromName(tostring(target)) local amount = math.floor(tonumber(amount)) if (targetPlayer) then local targetAccount = getPlayerAccount(targetPlayer) if not (isGuestAccount(targetAccount)) then if not (source == targetPlayer) then if (amount > 0) then local sourceCash = getAccountData(account, "cash") if (tonumber(sourceCash) > amount) then setTimer(outputChatBox,50,1,"* #FFFFFF"..getPlayerName(source).. " #FFB200donated " ..tostring(amount).. "$ to #FFFFFF"..getPlayerName(targetPlayer).."#FFB200!", getRootElement(), unpack(scriptcol[1])) addStat(account, "cash", -amount) addStat(targetAccount, "cash", amount) else outputChatBox("* Sorry but you don't that much money that you want to donate!", source, unpack(scriptcol[2])) end else outputChatBox("* Invalid number! Please enter a number > 0!", source, unpack(scriptcol[2])) end else outputChatBox("* Your can't donate money to yourself!", source, unpack(scriptcol[2])) end else outputChatBox(targetError, source, unpack(scriptcol[2])) end else outputChatBox("* Could not find player!", source, unpack(scriptcol[2])) end else outputChatBox("* Error: Please enter an amount! SYNTAX: !donate ", source, unpack(scriptcol[2])) end else outputChatBox("* Error: Please enter a player name! SYNTAX: !donate ", source, unpack(scriptcol[2])) end else outputChatBox(registerError, source, unpack(scriptcol[2])) end end addEvent("onMoneyTrasf", true) addEventHandler("onMoneyTrasf", getRootElement(), trasferMoney) ----------------------CLIENT SIDE function trasfMoney() if source == GUIEditor_Button[2] then local theRei = guiGridListGetItemText ( GUIEditor_Grid[2], guiGridListGetSelectedItem ( GUIEditor_Grid[2]), 1 ) local amount = guiGetText(GUIEditor_Edit[1]) triggerServerEvent("onMoneyTrasf", getLocalPlayer(), theRei, getLocalPlayer(), amount) end end addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], trasfMoney) P.S: In the gridlist there are the fully names whit the codes, so idk why the script can't get the player...
  11. I know, i wanted to let he to make the CS part
  12. shopMarker = createMarker (2308.87,-1.91,25.9,"cylinder",1,255,0,0,128) function showGui (hitPlayer, matchingDimension) --------- end addEventHandler("onMarkerHit",shopMarker,showGui)
  13. #Paper

    get()

    Sniper gave me the permission to use and modifi it Now i'm working to make an userpanel, and i need this func for the shop
  14. #Paper

    get()

    I need to get the settings from the resource in client side... then i use the clientGet func in CS...
  15. #Paper

    Serial login

    You wanna autologin only for admins ? Why the serial is needed then ? and so what is needed?
  16. #Paper

    get()

    it's defined in the CS...
  17. #Paper

    get()

    I did adapt it for my needs, but it gives some errors: -----SERVER SIDE addEvent("onClientRequestSettings", true) function sendSettings() local discoPrice = tonumber(clientGet("discoPrice")) local joinmsgPrice = tonumber(clientGet("joinmsgPrice")) local ghostPrice = tonumber(clientGet("ghostPrice")) local ghostDuration = tonumber(clientGet("ghostDuration")) * 1000 local wavesPrice = tonumber(clientGet("wavesPrice")) local fixPrice = tonumber(clientGet("fixPrice")) local flipPrice = tonumber(clientGet("flipPrice")) local nitroPrice = tonumber(clientGet("nitroPrice")) triggerClientEvent(source, "receiveSettings", discoPrice, joinmsgPrice, ghostPrice, ghostDuration, wavesPrice, fixPrice, flipPrice, nitroPrice) end addEventHandler("onClientRequestSettings", getRootElement(), sendSettings) -----CLIENT SIDE function clientGet() triggerServerEvent("onClientRequestSettings", getLocalPlayer()) end addEvent("receiveSettings", true) function setsValues(disco, join, ghostP, ghostDur, wave, fix, flip, nitro) local discoPrice = disco local joinmsgPrice = join local ghostPrice = ghostP local ghostDuration = ghostDur local wavesPrice = wave local fixPrice = fix local flipPrice = flip local nitroPrice = nitro end addEventHandler("receiveSettings", getRootElement(), sendSettings)
  18. #Paper

    Serial login

    Mhhh, it's ok as idea, but i never can understand XML programming, can you help me just whit saving and loading serial, pass and acc name?
  19. #Paper

    Serial login

    Hey all! How can i make an autologin by serial on join just for admins?
  20. #Paper

    get()

    Thanks I'm not in my pc, but when i am i'll test it ;D
  21. #Paper

    get()

    How i can use this function in clientside?
  22. I can make some scripts for €, contact me on skype: skiper964
×
×
  • Create New...