Wysłany: 2020-06-22, 16:25
NoNamik
Wiek: 35 Na forum: 2185 dni Posty: 289
Nick w MP: JestemNoNamem
Piwa : 374
Siema pomoze ktos zeby komenda /przelej dawala hajs do banku a /dajkase do portfelu
function onTransferMoney ( plr , cmd , target , value )
if not target or not tonumber ( value ) then
outputChatBox ( '#007aff(ⓘ) #FFFFFFPoprawne u?ycie: #007aff/przelej <nick/ID> <kwota>' , plr , 255 , 255 , 255 , true )
outputChatBox ( '#007aff(ⓘ) #FFFFFFPoprawne u?ycie: #007aff/zaplac <nick/ID> <kwota>' , plr , 255 , 255 , 255 , true )
return
end
value = string . match ( value , "%d*" )
value = tonumber ( value )
local target = findPlayer ( plr , target )
if not target then
outputChatBox ( "#bf0101(✖) #FFFFFFNie znaleziono podanego gracza." , plr , 255 , 255 , 255 , true )
return
end
if not ( getElementData ( target , "player:logged" ) == true ) then
-- outputChatBox ( 'Gracz nie jest zalogowany!.' , plr , 255 , 0 , 0 )
outputChatBox ( "#bf0101(✖) #FFFFFFPodany gracz nie jest zalogowany." , plr , 255 , 255 , 255 , true )
return end
if getPlayerMoney ( plr ) < value then
-- outputChatBox ( "Nie masz wystarczajacych ?rodk?w." , plr )
outputChatBox ( "#bf0101(✖) #FFFFFFNie posiadasz wystarczaj?cych ?rodk?w przy sobie." , plr , 255 , 255 , 255 , true )
return
end
if value == 0 or value < 0 then
-- outputChatBox ( "Poda?e?(a?) nie prawid?ow? warto??." , plr )
outputChatBox ( "#bf0101(✖) #FFFFFFPodano nie prawid?ow? warto??." , plr , 255 , 255 , 255 , true )
return
end
takePlayerMoney ( plr , value )
givePlayerMoney ( target , value )
outputChatBox ( "#007aff(ⓘ) #FFFFFFPrzela?e?/a? got?wk? graczowi: (#007aff" .. getElementData ( target , "id" ).. "#FFFFFF) #007aff" .. getPlayerName ( target ): gsub ( "#%x%x%x%x%x%x" , "" ).. "#FFFFFF, ilo?? przelanej got?wki: #007aff" .. value , plr , 245 , 219 , 0 , true )
outputChatBox ( "#007aff(ⓘ) #FFFFFFOtrzyma?e?/a? got?wk? od gracza: (#007aff" .. getElementData ( plr , "id" ).. "#FFFFFF) #007aff" .. getPlayerName ( plr ): gsub ( "#%x%x%x%x%x%x" , "" ).. "#FFFFFF, ilo?? otrzymanej got?wki: #007aff" .. value , target , 225 , 199 , 0 , true )
local transfer_text =( '(Przelew) [%d]%s(sid:%d) >> [%d]%s(sid:%d): %s' ): format ( getElementData ( plr , "id" ), getPlayerName ( plr ): gsub ( "#%x%x%x%x%x%x" , "" ), getElementData ( plr , "player:sid" ), getElementData ( target , "id" ), getPlayerName ( target ): gsub ( "#%x%x%x%x%x%x" , "" ), getElementData ( target , "player:sid" ), value )
triggerClientEvent ( "onDebugMessage" , resourceRoot , transfer_text , 4 , "PRZELEWY" )
-- triggerEvent ( "admin:addText" , resourceRoot , transfer_text : gsub ( "#%x%x%x%x%x%x" , "" ))
triggerEvent ( "admin:addText" , resourceRoot , RGBToHex ( 203 , 0 , 255 ).. transfer_text .. RGBToHex ( 255 , 255 , 255 ), math . random ( 0 , 99 ))
triggerEvent ( "admin:logs" , root , transfer_text )
outputServerLog ( transfer_text )
end
addCommandHandler ( 'przelej' , onTransferMoney )
addCommandHandler ( 'zaplac' , onTransferMoney )
Wysłany: 2020-06-22, 18:07
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
I w czym problem? Jakie? b??dy /debugscript 3? Szukasz osoby ch?tnej do przerobienia czy co?? Je?li tak - mo?esz si? zemkn?? skontaktowa? za pomoc? podpisu.
Wysłany: 2020-06-23, 00:56
Maniekxx
Amator
Wiek: 24 Na forum: 2894 dni Posty: 232
Nick w MP: Maniekxx
Piwa : 225
Mniej wi?cej co? takiego:
function onTransferMoney ( plr , cmd , target , value )
if not target or not tonumber ( value ) then
outputChatBox ( '#007aff(ⓘ) #FFFFFFPoprawne u?ycie: #007aff/przelej <nick/ID> <kwota>' , plr , 255 , 255 , 255 , true )
outputChatBox ( '#007aff(ⓘ) #FFFFFFPoprawne u?ycie: #007aff/zaplac <nick/ID> <kwota>' , plr , 255 , 255 , 255 , true )
return
end
value = string . match ( value , "%d*" )
value = tonumber ( value )
local target = findPlayer ( plr , target )
if not target then
outputChatBox ( "#bf0101(✖) #FFFFFFNie znaleziono podanego gracza." , plr , 255 , 255 , 255 , true )
return
end
--------------
if cmd == "przelej" then
if getPlayerMoney ( plr ) < value then
outputChatBox ( "#bf0101(✖) #FFFFFFNie posiadasz wystarczaj?cych ?rodk?w przy sobie." , plr , 255 , 255 , 255 , true )
return
end
if value == 0 or value < 0 then
outputChatBox ( "#bf0101(✖) #FFFFFFPodano nie prawid?ow? warto??." , plr , 255 , 255 , 255 , true )
return
end
outputChatBox ( "* Trzeba dopisa? tu strone serwera, tam b?dzie export do bazy danych (czyli do bankomatu)" )
return end
--------------
if not ( getElementData ( target , "player:logged" ) == true ) then
-- outputChatBox ( 'Gracz nie jest zalogowany!.' , plr , 255 , 0 , 0 )
outputChatBox ( "#bf0101(✖) #FFFFFFPodany gracz nie jest zalogowany." , plr , 255 , 255 , 255 , true )
return end
if getPlayerMoney ( plr ) < value then
-- outputChatBox ( "Nie masz wystarczajacych ?rodk?w." , plr )
outputChatBox ( "#bf0101(✖) #FFFFFFNie posiadasz wystarczaj?cych ?rodk?w przy sobie." , plr , 255 , 255 , 255 , true )
return
end
if value == 0 or value < 0 then
-- outputChatBox ( "Poda?e?(a?) nie prawid?ow? warto??." , plr )
outputChatBox ( "#bf0101(✖) #FFFFFFPodano nie prawid?ow? warto??." , plr , 255 , 255 , 255 , true )
return
end
takePlayerMoney ( plr , value )
givePlayerMoney ( target , value )
outputChatBox ( "#007aff(ⓘ) #FFFFFFPrzela?e?/a? got?wk? graczowi: (#007aff" .. getElementData ( target , "id" ).. "#FFFFFF) #007aff" .. getPlayerName ( target ): gsub ( "#%x%x%x%x%x%x" , "" ).. "#FFFFFF, ilo?? przelanej got?wki: #007aff" .. value , plr , 245 , 219 , 0 , true )
outputChatBox ( "#007aff(ⓘ) #FFFFFFOtrzyma?e?/a? got?wk? od gracza: (#007aff" .. getElementData ( plr , "id" ).. "#FFFFFF) #007aff" .. getPlayerName ( plr ): gsub ( "#%x%x%x%x%x%x" , "" ).. "#FFFFFF, ilo?? otrzymanej got?wki: #007aff" .. value , target , 225 , 199 , 0 , true )
local transfer_text =( '(Przelew) [%d]%s(sid:%d) >> [%d]%s(sid:%d): %s' ): format ( getElementData ( plr , "id" ), getPlayerName ( plr ): gsub ( "#%x%x%x%x%x%x" , "" ), getElementData ( plr , "player:sid" ), getElementData ( target , "id" ), getPlayerName ( target ): gsub ( "#%x%x%x%x%x%x" , "" ), getElementData ( target , "player:sid" ), value )
triggerClientEvent ( "onDebugMessage" , resourceRoot , transfer_text , 4 , "PRZELEWY" )
-- triggerEvent ( "admin:addText" , resourceRoot , transfer_text : gsub ( "#%x%x%x%x%x%x" , "" ))
triggerEvent ( "admin:addText" , resourceRoot , RGBToHex ( 203 , 0 , 255 ).. transfer_text .. RGBToHex ( 255 , 255 , 255 ), math . random ( 0 , 99 ))
triggerEvent ( "admin:logs" , root , transfer_text )
outputServerLog ( transfer_text )
end
addCommandHandler ( 'przelej' , onTransferMoney )
addCommandHandler ( 'dajkase' , onTransferMoney )
Wysłany: 2020-06-23, 09:22
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Tagi: komenda :: /przelej
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: