Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2014-12-09, 15:31


wwa22442







Wiek: 38
Na forum: 4847 dni
Posty: 127

Piwa: 82

Respekt: 50

Ostrzeżeń: 20%
Witam.

Jak zrobi? w tym skrypcie, aby podczas wpisania id np 281 [czyli policyjnego] nie m?g?by go nikt wybra? ?

oto skrypt :


local marker = createMarker(2244.4982910156, -1664.8819580078, 14.4765625, "cylinder", 2, 0, 155, 255, 30)
local blip = createBlip ( 2244.4982910156, -1664.8819580078, 15.4765625, 45 )


GUIEditor = {

    label = {}

}

ventana = guiCreateGridList(0.33, 0.28, 0.34, 0.34, true)

guiSetAlpha(ventana, 0.85)
guiSetVisible ( ventana, false )



GUIEditor.label[1] = guiCreateLabel(0.31, 0.00, 0.47, 0.21, "Skin Shop", true, ventana)

guiSetFont(GUIEditor.label[1], "sa-header")


GUIEditor.label[2] = guiCreateLabel(0.24, 0.27, 0.46, 0.11, "Skin ID:", true, ventana)

guiSetFont(GUIEditor.label[2], "default-bold-small")

guiLabelSetColor(GUIEditor.label[2], 41, 183, 3)


edit = guiCreateEdit(0.15, 0.40, 0.30, 0.14, "", true, ventana)


cerrar = guiCreateButton(0.90, 0.02, 0.07, 0.11, "X", true, ventana)

tomar = guiCreateButton(0.30, 0.69, 0.44, 0.18, "Take Skin", true, ventana)


GUIEditor.label[3] = guiCreateLabel(0.66, 0.25, 0.28, 0.37, "    Skin Cost:\n\n     10000 $", true, ventana)

guiSetFont(GUIEditor.label[3], "default-bold-small")

guiLabelSetColor(GUIEditor.label[3], 27, 187, 227)

function abrir ( hitElement )
if getElementType(hitElement) == "player" and (hitElement == localPlayer) then
guiSetVisible(ventana, true)
showCursor(true)
outputChatBox ( "Welcome to the Skin Shop!", 255, 0, 0 )
end
end
addEventHandler("onClientMarkerHit", marker, abrir)

function cerrarv()
    guiSetVisible ( ventana, false )
    showCursor ( false )
    guiSetInputEnabled ( false )
end
addEventHandler("onClientGUIClick", cerrar, cerrarv, false)

function darskin()
local pMoney = getPlayerMoney(source)
if pMoney >= 10000 then
takePlayerMoney ( 10000 )
setPlayerSkin(localPlayer, tonumber( guiGetText ( edit ) ))
outputChatBox ( "Your skin has successful change!", 0, 255, 0 )
else
outputChatBox ( "You dont have money!", 255, 0, 0 )
end
end
addEventHandler("onClientGUIClick", tomar, darskin, false)


Za pomoc daje piwka :)

Pozdrawiam :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-09, 15:33


MeeShuffle

Programista/Grafik






Wiek: 33
Na forum: 4535 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8578

Respekt: 535,3
Respekt: 535,3

if cos == 281 then return end

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-09, 15:36


wwa22442







Wiek: 38
Na forum: 4847 dni
Posty: 127

Piwa: 82

Respekt: 50

Ostrzeżeń: 20%
Shuffle, w kt?rym miejscu to wstawi? ? Oraz jak doda? wi?cej ni? jeden ?

Postaw piwo autorowi tego posta
 

 
Tagi: zakaz :: uzywania :: skina
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku