#Paper
Members-
Posts
568 -
Joined
-
Last visited
Everything posted by #Paper
-
Thanks bro! But can you explain why mine version doesn't works?
-
yes... i trigger the onPlayerWins() func by the race gm... and then i trigger the addStat func
-
there aren't any error... but the scoreboard still be to 0... doesn't change
-
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...
-
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
-
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
-
There is the contry script integrated in the admin res... check it
-
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...
-
I know, i wanted to let he to make the CS part
-
shopMarker = createMarker (2308.87,-1.91,25.9,"cylinder",1,255,0,0,128) function showGui (hitPlayer, matchingDimension) --------- end addEventHandler("onMarkerHit",shopMarker,showGui)
-
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
-
I need to get the settings from the resource in client side... then i use the clientGet func in CS...
-
You wanna autologin only for admins ? Why the serial is needed then ? and so what is needed?
-
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)
-
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?
-
Hey all! How can i make an autologin by serial on join just for admins?
-
Thanks I'm not in my pc, but when i am i'll test it ;D
-
I can make some scripts for €, contact me on skype: skiper964
