-Skrypt Drzwi dla p?ci

Status
Zamknięty.

Damian955

Active User
Zarejestrowany
Dołączył
Kwiecień 20, 2009
Posty
54
Liczba reakcji
0
Poszukuj? skryptu na drzwi przez kt?re mo?e przej?? tylko jedna p?e?. Skrypt pod tibi? 8.54.
 
Odp: Drzwi dla p?ci

[LUA]getPlayerSex(cid)
Info
This function checks player sex.

Returns
Player sex.
For example:
PLAYERSEX_FEMALE (0) - when player is female
PLAYERSEX_MALE (1) - when player is male
PLAYERSEX_GAMEMASTER (2) - gamemaster (Means if player have changed their sex to type = 2)

Example
local playerPos = getCreaturePosition(cid)
local playerSex = getPlayerSex(cid)
if playerSex == PLAYERSEX_FEMALE then --female
doSendAnimatedText(playerPos, 'GiRl :*:*', TEXTCOLOR_GOLD)
elseif playerSex == PLAYERSEX_MALE then --male
doSendAnimatedText(playerPos, 'Wtf? I aM BoY.', TEXTCOLOR_GOLD)
else --hermaphrodite
doSendAnimatedText(playerPos, 'Who am I? :(', TEXTCOLOR_GOLD)
end
[/LUA]
 
Odp: Drzwi dla p?ci

Wygl?da fajnie, ale nie wiem co z tym zrobi?. XD
 
Odp: Drzwi dla p?ci

No masz podane jak to dzia?a.

Czyli dajesz w skrypt z drzwiami:
[LUA]if getPlayerSex(cid) == 0 then[/LUA]
Nie zapomnij enda do if'a

Zamiast 0 mozesz jeszcze 1 wstawi?
0 to kobita
1 to chlopaczek
 
Odp: Drzwi dla p?ci

Mo?e mi kto? to sklei? w gotowca? Nie potrafi? robi? drzwi.
 
Odp: Drzwi dla p?ci

[LUA]function onUse(cid, item, frompos, item2, topos)
if getPlayerSex(cid) == 1 then
pos = getPlayerPosition(cid)
if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,'Stan na przeciwko drzwi.')
return true
end
doTeleportThing(cid, pos)
doSendMagicEffect(pos, 10)
else
doPlayerSendTextMessage(cid, 22, "Nie jestes facetem!")
end
return true
end[/LUA]

Jak chcesz dla kobitek to zmieniasz "getPlayerSex == 1" na 0.
 
Odp: Drzwi dla p?ci

Dzia?a! Dzi?ki wielkie. Lec? reputy.

Do zamkni?cia.
 
Ostatnia edycja:
Status
Zamknięty.
Back
Do góry