Jump to content

AHSS

Members
  • Posts

    87
  • Joined

  • Last visited

Everything posted by AHSS

  1. how to make a loop throw all connected players meanning how to make function on all connected players like this setElementHealth(allconnectedplayers, 0) how?? thanks
  2. ok thanks again how to make a weapon save? how to get the weapon and the ammo and save it i know how to save but i dont know how to get the weapon and the ammo please tell me thanks citizen your really helping me
  3. ok thanks another question can someone tell me how to make a /goto or /gethere command i did this but it doesnt work function GetPlayerHere(theplayer, command, otherplayer) local x, y, z = getElementPosition(theplayer) succes = setElementPosition(otherplayer, x, y, z) if(succes) then outputChatBox("succes", theplayer) else outputChatBox("fail", theplayer) end end addCommandHandler("gethere", GetPlayerHere) function GoToPlayer(theplayer, command, otherplayer) local x, y, z = getElementPosition(otherplayer) succes = setElementPosition(theplayer, x, y, z) if(succes) then outputChatBox("succes", theplayer) else outputChatBox("Fail", theplayer) end end addCommandHandler("goto", GoToPlayer) it gives me the "fail" message always why? thanks please give me the right one please ------------------------------------------------------------- edit: the first question is still going on so please answer it too another question is how to make a function happens on a certain time or a fucntion that goes arround and arround if someone know samp i mean a SetTimer something like this i thought of local hour, min = getTime() and i was gonna do like this if(min == 30) then but then i i remembered that it must be with an event so i wanna know how to make something that checks like a function that happens each 5 min or any other timer if you didnt get it tell me i will explain
  4. ok thanks got another question if i got a file in it there is a playername score money guns blabla how to load a specific value i know this fileRead(file, bytes) this read specific bytes if i make like 1000 bytes it will read all or most of the file i wanna read 1value or specific one how??
  5. ok thanks last question how to send a message to all coloured? i know this outputChatBox("blabla", source, r, g, b, true) this will send a coloured message to a player but i want to send a coloured message to all how?? sorry thats the last question
  6. but how to know which event work with source and which element doesnt?
  7. guys please help iam a new scripter and i need help why is this not working? : function SavePLAYERNAME(theplayer) local playerName = getPlayerName(theplayer) local playerfile = fileCreate(playerName..".txt") if(playerFile) then fileWrite(playerFile,playerName) fileClose(playerFile) outputChatBox("OMG File Created Succesfully", source) else outputChatBox("Failed Again !", source) end end addEventHandler("onPlayerSpawn", getRootElement(), SavePLAYERNAME) addCommandHandler("savenow", SavePLAYERNAME) now its as following when the event happens which is player spawn i get this error in MTA Server.exe ERROR:attempt to concatenate local 'playerName' boolean value> but when i use the command it works but! it doesnt save like this works: local playerfile = fileCreate(playerName..".txt") this doesnt: if(playerFile) then fileWrite(playerFile,playerName) fileClose(playerFile) outputChatBox("OMG File Created Succesfully", source) else outputChatBox("Failed Again !", source) end and it shows me Failed Again! but the file gets created succesfully and with the player name but the name doesn't get saved in the file why? please help please help
  8. function SavePlayerFileWithName(theplayer) local pname = getPlayerName(theplayer) local pfile = fileCreate(pname..".txt") if(pfile) then fileWrite(pfile,pname) fileClose(pfile) outputChatBox(pname.."Name Succesfully Created The File",theplayer,-17,223,-17,true) else outputChatBox(pname.."Sorry You Failed Again x-(((",theplayer,-17,223,-17,true) end end addEventHandler("onPlayerSpawn", getRootElement(),SavePlayerFileWithName) the (MTA Server.exe) gave me badarguement @ 'getPlayerName and attemp to concatenate local 'pname' so???
  9. so this is it function joinHandler() local x = 2228.9583 local y = -1722.1108 local z = 13.5625 spawnPlayer(source, x, y, z) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome to My Server", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) function SavePlayerName(theplayer) local pname = getPlayerName(theplayer) local pfile = fileCreate(pname) if (pfile) then fileWrite(pfile,pname) fileClose(pfile) outputChatBox(pname.." This Name is saved in a file containing the same name",theplayer,-17,223,-17,true) end end addEventHandler("onPlayerJoin", getRootElement(), SavePlayerName) so thats what i did the first work but the second doesnt it doesnt create the file or even output what iam doing wrong?
  10. AHSS

    Samp To Mta Convertor

    lol all my scripts is 0.3c well now i dont want to convert i wanna learn how to script but i really need help i want someone to help me i dont get it from wiki XX3 can you help? if you can please help me reply here please if you cant say that you cant so i dont have to look at the thread thanks
  11. AHSS

    Samp To Mta Convertor

    hi, iam new to mta i am a samp scripter i was just asking is there a way to convert whole samp script not only map to mta?? i tried amx deploy but it didnt work if it work for you or you have a program that does the job please post it or give me any information you have thanks
×
×
  • Create New...