Szerző Téma: getPlayerName? Hogyan?  (Megtekintve 1261 alkalommal)

Nem elérhető Ricsey

  • 259
    • Profil megtekintése
getPlayerName? Hogyan?
« Dátum: 2014. Január 26. - 00:23:52 »
0 Show voters
Szevasztok
Próbálkozok névre szóló kapuval és azt is szeretném hogy több ember tudja kinyitni de csak azok akiket én akarok írtam rá egy scriptet de le se rakja a kaput megnéznétek mi nem jó benne?
 
mbkapu = createObject(980, 1358.2998046875, 713.19921875, 12.60000038147, 0, 0, 90)
function gate(player)
    local localPlayerName = getPlayerName(getLocalPlayer())
if (localPlayerName==\"Shane_Ghaspard\") then
moveObject(mbkapu, 500, 1358.2998046875, 713.19921875, 6.9000000953674)
else
outputChatBox(\"Ezt a kaput csak Shane Ghaspard használhatja\",player,255,0,0)
end
addCommandHandler ( \"mbgate\", gate )
function gatec(player)
    local localPlayerName = getPlayerName(getLocalPlayer())
if (localPlayerName==\"Shane_Ghaspard\") then
moveObject(mbkapu, 500, 1358.2998046875, 713.19921875, 12.60000038147)
else
outputChatBox(\"Ezt a kaput csak Shane Ghaspard használhatja\",player,255,0,0)
end
addCommandHandler ( \"mbgatec\", gatec )
« Utoljára szerkesztve: 2014. Január 26. - 10:59:10 írta [HUN.S]DjRiCsI[5] »

Nem elérhető Enigma

  • 391
    • Profil megtekintése
getPlayerName? Hogyan?
« Válasz #1 Dátum: 2014. Január 26. - 02:40:33 »
0 Show voters
debugscript 3 alatt milyen hibát kapsz? Kaput azért nem rakja le mert funkción kívül van.
« Utoljára szerkesztve: 2014. Január 26. - 02:42:54 írta Enigma »

getPlayerName? Hogyan?
« Válasz #2 Dátum: 2014. Január 26. - 08:40:40 »
+1 Show voters
Rossz a script. Szerver részre kell berakni ezt:
 

bkapu = createObject(980, 1358.2998046875, 713.19921875, 12.60000038147, 0, 0, 90)
function gate(player)
    local localPlayerName = getPlayerName(player)
if (localPlayerName==\"Shane_Ghaspard\") then
moveObject(mbkapu, 500, 1358.2998046875, 713.19921875, 6.9000000953674)
else
outputChatBox(\"Ezt a kaput csak Shane Ghaspard használhatja\",player,255,0,0)
end
end
addCommandHandler ( \"mbgate\", gate )
function gatec(player)
    local localPlayerName = getPlayerName(player)
if (localPlayerName==\"Shane_Ghaspard\") then
moveObject(mbkapu, 500, 1358.2998046875, 713.19921875, 12.60000038147)
else
outputChatBox(\"Ezt a kaput csak Shane Ghaspard használhatja\",player,255,0,0)
end
end
addCommandHandler ( \"mbgatec\", gatec )

Nem elérhető Ricsey

  • 259
    • Profil megtekintése
getPlayerName? Hogyan?
« Válasz #3 Dátum: 2014. Január 26. - 10:09:51 »
0 Show voters
Idézetet írta: lackos888 date=1390722040\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"46052\" data-ipsquote-contentclass=\"forums_Topic
Rossz a script. Szerver részre kell berakni ezt:
 

bkapu = createObject(980, 1358.2998046875, 713.19921875, 12.60000038147, 0, 0, 90)
function gate(player)
    local localPlayerName = getPlayerName(player)
if (localPlayerName==\"Shane_Ghaspard\") then
moveObject(mbkapu, 500, 1358.2998046875, 713.19921875, 6.9000000953674)
else
outputChatBox(\"Ezt a kaput csak Shane Ghaspard használhatja\",player,255,0,0)
end
end
addCommandHandler ( \"mbgate\", gate )
function gatec(player)
    local localPlayerName = getPlayerName(player)
if (localPlayerName==\"Shane_Ghaspard\") then
moveObject(mbkapu, 500, 1358.2998046875, 713.19921875, 12.60000038147)
else
outputChatBox(\"Ezt a kaput csak Shane Ghaspard használhatja\",player,255,0,0)
end
end
addCommandHandler ( \"mbgatec\", gatec )

 

Köszönöm ez mûködik és ha több nevet akarok a kapuhoz hozzáadni akkor mit kell tegyek? mert próbáltam már több felsõ vesszõvel oda írni a többi nevet de az nem jött be

getPlayerName? Hogyan?
« Válasz #4 Dátum: 2014. Január 26. - 10:14:05 »
+1 Show voters
Így:
 

bkapu = createObject(980, 1358.2998046875, 713.19921875, 12.60000038147, 0, 0, 90)
function gate(player)
    local localPlayerName = getPlayerName(player)
if (localPlayerName==\"Shane_Ghaspard\" or localPlayerName==\"Budos_Jozsi\") then
moveObject(mbkapu, 500, 1358.2998046875, 713.19921875, 6.9000000953674)
else
outputChatBox(\"Ezt a kaput csak Shane Ghaspard és Budos Jozsi használhatja\",player,255,0,0)
end
end
addCommandHandler ( \"mbgate\", gate )
function gatec(player)
    local localPlayerName = getPlayerName(player)
if (localPlayerName==\"Shane_Ghaspard\" or localPlayerName==\"Budos_Jozsi\")then
moveObject(mbkapu, 500, 1358.2998046875, 713.19921875, 12.60000038147)
else
outputChatBox(\"Ezt a kaput csak Shane Ghaspard és Budos Jozsi használhatja\",player,255,0,0)
end
end
addCommandHandler ( \"mbgatec\", gatec )

Nem elérhető Ricsey

  • 259
    • Profil megtekintése
getPlayerName? Hogyan?
« Válasz #5 Dátum: 2014. Január 26. - 10:58:58 »
0 Show voters
Idézetet írta: lackos888 date=1390727645\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"46052\" data-ipsquote-contentclass=\"forums_Topic
Így:
 

bkapu = createObject(980, 1358.2998046875, 713.19921875, 12.60000038147, 0, 0, 90)
function gate(player)
    local localPlayerName = getPlayerName(player)
if (localPlayerName==\"Shane_Ghaspard\" or localPlayerName==\"Budos_Jozsi\") then
moveObject(mbkapu, 500, 1358.2998046875, 713.19921875, 6.9000000953674)
else
outputChatBox(\"Ezt a kaput csak Shane Ghaspard és Budos Jozsi használhatja\",player,255,0,0)
end
end
addCommandHandler ( \"mbgate\", gate )
function gatec(player)
    local localPlayerName = getPlayerName(player)
if (localPlayerName==\"Shane_Ghaspard\" or localPlayerName==\"Budos_Jozsi\")then
moveObject(mbkapu, 500, 1358.2998046875, 713.19921875, 12.60000038147)
else
outputChatBox(\"Ezt a kaput csak Shane Ghaspard és Budos Jozsi használhatja\",player,255,0,0)
end
end
addCommandHandler ( \"mbgatec\", gatec )

 

Köszönöm mûködik

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal