Jump to content

mastermax777

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by mastermax777

  1. source doesnt work... i can still see myself function player_Spawn ( posX, posY, posZ, spawnRotation, theTeam, theSkin, theInterior, theDimension ) if(not firstspawn[source]) then firstspawn[source] = true; givePlayerMoney ( source, 10000 ) blip = createBlipAttachedTo (source, 56) setElementVisibleTo ( blip, source, false ) players = getElementsByType ( "player" ) for k, v in ipairs(players) do if(v ~= source) then setElementVisibleTo ( blip, v, true ) end end end giveWeapon (source, 31, 400) giveWeapon (source, 26, 200) giveWeapon (source, 9, 1) giveWeapon (source, 29, 400) end addEventHandler ( "onPlayerSpawn", getRootElement(), player_Spawn )
  2. MY QUESTION IS, HOW TO define SourceP ffs cant u see i did '--local sourceP' in my script but it doesnt work?!? function player_Spawn ( posX, posY, posZ, spawnRotation, theTeam, theSkin, theInterior, theDimension ) if(not firstspawn[source]) then firstspawn[source] = true; givePlayerMoney ( source, 10000 ) local sourceP blip = createBlipAttachedTo (sourceP, 56) setElementVisibleTo ( blip, sourceP, false ) players = getElementsByType ( "player" ) for k, v in ipairs(players) do if(v ~= source) then setElementVisibleTo ( blip, v, true ) end end end end addEventHandler ( "onPlayerSpawn", getRootElement(), player_Spawn ) Happy?
  3. No. this is my code Solidsnake14... --local sourceP blip = createBlipAttachedTo (sourceP, 56) setElementVisibleTo ( blip, sourceP, false ) players = getElementsByType ( "player" ) for k, v in ipairs(players) do if(v ~= source) then setElementVisibleTo ( blip, v, true ) end end
  4. sourceP?? it works but where do i define it ?? it gives me warnings ... (bad argument at ...) and with source it doesnt disappear o_o
  5. i want to make a blip appear for ALL player expect myself. this is what i tried so far... blip = createBlipAttachedTo (source, 56) i = getElementsByType ( "player" ) for k, v in ipairs(i) do if(i ~= source) then setElementVisibleTo ( blip, v, false ) end end no errors but i can still see the blip on the mini map over myself
  6. finally, someone... thank u guys especially karlis and aaran i solved it...
  7. wait is it server side or client?
  8. why u ask ? i know it doesnt work ! pls help me dont post useless -.- if(firstspawn[source]) then firstspawn[source] = false; givePlayerMoney ( source, 10000 ) outputChatBox("called?") createBlipAttachedTo (source, 56) end
  9. but will it generate errors or work ?
  10. ok so how can i do something like this in lua? firstspawn = {} function player_Spawn ( posX, posY, posZ, spawnRotation, theTeam, theSkin, theInterior, theDimension ) if(firstspawn[source]) --do stuff... firstspawn[source] = false; end end addEventHandler ( "onPlayerSpawn", getRootElement(), player_Spawn )
  11. if anyone here knows pawno there is a command that i can do for example new bool:first[MAX_PLAYERS]; so my question how do i make global variable for all players (a boolean, only true and false ) so then on player spawn i can do... first[playerid] = true; --or if(first[thePlayer]==true) --etc... and so on.. i guess i mean by max_players is for each client or something like that if anybody have understood me ?
  12. sounds = { "back.wav", "death.wav", "pisses.wav" } function wasted (killer, weapon, bodypart) local randID = math.random ( 1, #sounds) local randomSound = sounds[randomID] local sound = playSound(randomSound) setSoundVolume(sound, 1.0) end no error , sound just doesn't play... pls help
  13. yes ty both i already solved it..
  14. when a player dies (onplayerwasted i want to respawn player but i cant because onplayerwasted is client side and spawnplayer is server side? i only started yesterday so pls help
×
×
  • Create New...