Wysłany: 2013-04-27, 16:27
Problemior
Wiek: 29 Na forum: 5272 dni Posty: 5
Nick w MP: Problemior
Siema mam skrypt z dru?ynami i nie wiem jaki mam b??d w tym ?eby po wej?ciu dodawa?o do teamu Cywile
Kod: function createTeamsOnStart ()
teamCywile = createTeam ( "Cywile", 255, 255, 255 )
teamPolicja = createTeam ( "Policja", 28, 134, 238 )
teamPomocDrogowa = createTeam ( "Pomoc Drogowa", 255, 20, 147 )
teamTaxi = createTeam ( "Taxi", 255, 215, 0 )
teamPogotowie = createTeam ( "Pogotowie", 82, 139, 139 )
teamAmmunation = createTeam ( "Ammunation", 54, 54, 54 )
end
addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), teams )
function onPlayerSpawn ( player)
spawnPlayer ( source, -1496.380004828, 920.18511962891, 7.1875 )
setPlayerTeam ( player, Cywile )
givePlayerMoney ( source, 100 )
fadeCamera ( source, true, 3 )
outputChatBox ( "Witaj na serwerze.", source, 0, 255, 255 )
setCameraTarget ( source, source )
end
addEventHandler ( "onPlayerJoin", getRootElement(), onPlayerSpawn )
Wysłany: 2013-04-27, 16:33
Riot
3X
Wiek: 29 Na forum: 5729 dni Posty: 1123
Nick w MP: Riot/3X
Piwa : 286
Nazwa funkcji: createTeamsOnStart
Funkcja kt?ra ma by? wykonywana po uruchomieniu skryptu: teams (a takiej funkcji nie ma).
Zmie?:
addEventHandler ( "onResourceStart" , getResourceRootElement ( getThisResource ()), teams )
na:
addEventHandler ( "onResourceStart" , getResourceRootElement ( getThisResource ()), createTeamsOnStart )
Powinno dzia?a?, je?li nie to poszukamy innych b??d?w.
Wysłany: 2013-04-27, 17:23
Problemior
Wiek: 29 Na forum: 5272 dni Posty: 5
Nick w MP: Problemior
niestety nadal nie dodaje do teamu cywile po wej?ciu na serwer
Wysłany: 2013-04-27, 17:34
Riot
3X
Wiek: 29 Na forum: 5729 dni Posty: 1123
Nick w MP: Riot/3X
Piwa : 286
function createTeamsOnStart ()
teamCywile = createTeam ( "Cywile" , 255 , 255 , 255 )
teamPolicja = createTeam ( "Policja" , 28 , 134 , 238 )
teamPomocDrogowa = createTeam ( "Pomoc Drogowa" , 255 , 20 , 147 )
teamTaxi = createTeam ( "Taxi" , 255 , 215 , 0 )
teamPogotowie = createTeam ( "Pogotowie" , 82 , 139 , 139 )
teamAmmunation = createTeam ( "Ammunation" , 54 , 54 , 54 )
end
addEventHandler ( "onResourceStart" , getResourceRootElement ( getThisResource ()), createTeamsOnStart )
function onPlayerSpawn ()
spawnPlayer ( source , - 1496.380004828 , 920.18511962891 , 7.1875 )
setPlayerTeam ( source , teamCywile )
givePlayerMoney ( source , 100 )
fadeCamera ( source , true , 3 )
outputChatBox ( "Witaj na serwerze." , source , 0 , 255 , 255 )
setCameraTarget ( source , source )
end
addEventHandler ( "onPlayerJoin" , getRootElement (), onPlayerSpawn )
Poczytaj o podstawach, robisz dosy? proste b??dy.
Wysłany: 2013-04-27, 17:43
Problemior
Wiek: 29 Na forum: 5272 dni Posty: 5
Nick w MP: Problemior
dobra ale wi?kszo?? skrypt?w mi dzia?a mojego autorstwa . A co do tego to dalej nie dzia?a ; /
Wysłany: 2013-04-27, 17:58
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
function createTeamsOnStart ()
teamCywile = createTeam ( "Cywile" , 255 , 255 , 255 )
teamPolicja = createTeam ( "Policja" , 28 , 134 , 238 )
teamPomocDrogowa = createTeam ( "Pomoc Drogowa" , 255 , 20 , 147 )
teamTaxi = createTeam ( "Taxi" , 255 , 215 , 0 )
teamPogotowie = createTeam ( "Pogotowie" , 82 , 139 , 139 )
teamAmmunation = createTeam ( "Ammunation" , 54 , 54 , 54 )
end
addEventHandler ( "onResourceStart" , getRootElement (), createTeamsOnStart )
function onPlayerSpawn ( thePlayer )
spawnPlayer ( thePlayer , - 1496.380004828 , 920.18511962891 , 7.1875 )
setPlayerTeam ( thePlayer , teamCywile )
givePlayerMoney ( thePlayer , 100 )
fadeCamera ( thePlayer , true , 3 )
outputChatBox ( "Witaj na serwerze." , thePlayer , 0 , 255 , 255 )
end
addEventHandler ( "onPlayerJoin" , getRootElement (), onPlayerSpawn )
Zobacz czy dzia?a
Wysłany: 2013-04-27, 18:04
Riot
3X
Wiek: 29 Na forum: 5729 dni Posty: 1123
Nick w MP: Riot/3X
Piwa : 286
M?j kod dzia?a, nawet teraz sprawdzi?em bo si? zdziwi?em. Mo?e co? w dalszej cz??ci kodu masz ?le/nie skopiowa?e? dok?adnie i urwa?o Ci jak?? literke?
Wysłany: 2013-04-27, 18:14
irvs126
www.lss-rp.pl
Wiek: 36 Na forum: 5461 dni Posty: 109
Nick w MP: irvs126
Piwa : 97
Powiedz po jakiej stronie umieszczasz sw?j skrypt.
server/client
Mo?e co? z debuga?(Przed uruchomieniem skryptu wpisz /debugscript 3 )
Podpis
[you]
, Sprawdź pierwszy serwer Roleplay, stawiający duży nacisk na grę In Character!
www.lss-rp.pl
Tagi: dodawanie :: teamu :: wejściu
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: