Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. lol, i tryied that already, now i'm using this: if getPedTotalAmmo ( player, v ) == 0 or not getPedTotalAmmo(player) or not getPedWeapon(player,v) then, for now seems to work, but it may get buggy after a while.
  2. That won't work, outputs an error: "attempt to compare number with boolean".
  3. This function checks for what category i want to check, then it checks if i have the weapons and returns true or false.
  4. What...? I use this function on my script like this: if checkWeapon(source,cat,model,slot) then
  5. Do you think i'm a newbie scripter? i have about 1,5 - 2 years scripting in MTA, is that a joke?
  6. Why do you ask? the problem is on the code i posted.
  7. It's a server-side script.
  8. Yes, this way you can get the element from a script using getElementByID function.
  9. Castillo

    checkWeapon

    Hey there, i don't use to ask for help, but right now i'm a bit confused, this function keeps returning wrong, function checkWeapon(player,cat) melee = {1,10} primary = {3,5,6} secondary = {2,4} projectiles = {7,8} if cat == "Melee" then for i,v in pairs(melee) do if getPedTotalAmmo ( player, v ) == 0 then return true else outputChatBox("You already have a weapon of this category!",player,255,0,0) return false end end elseif cat == "Primary" then for i,v in pairs(primary) do if getPedTotalAmmo ( player, v ) == 0 then return true else outputChatBox("You already have a weapon of this category!",player,255,0,0) return false end end elseif cat == "Secondary" then for i,v in pairs(secondary) do if getPedTotalAmmo ( player, v ) == 0 then return true else outputChatBox("You already have a weapon of this category!",player,255,0,0) return false end end elseif cat == "Projectiles" then for i,v in pairs(projectiles) do if getPedTotalAmmo ( player, v ) == 0 then return true else outputChatBox("You already have a weapon of this category!",player,255,0,0) return false end end end end It's used to check if i have a weapon in the desired category or not, but somehow it keeps returning that i don't have, any help is appreciated. Thanks in advance.
  10. No, there isn't such function, but, maybe you could use redirectPlayer. https://wiki.multitheftauto.com/wiki/RedirectPlayer
  11. This should move the object when the resource starts.
  12. It will say "Running" in green (if i remember well).
  13. There's an .EXE file which is called "xampp-control" if i'm not wrong, just double click or press enter, then start the mysql & apache services.
  14. We don't accept request, and to setup a mysql server, you must download a program named "xampp" which includes, apache, mysql, phpmyadmin, and some other stuff.
  15. Castillo

    Scripter

    If i'm not wrong, i've sent you a PM (that's what i said on the other topic), i guess you never answer?
  16. They uploaded again the same thing, still not containing any server-side script, and, the script triggers many events to server which doesn't exist. https://community.multitheftauto.com/ind ... ls&id=2115
  17. Castillo

    Scripter

    I think you have already a post about this? viewtopic.php?f=91&t=32820&p=345022#p345022
  18. Hi there (again), the resource(s) below just contains client-side scripts (strange from my point), it's also just a way to advertise their own server, i would say, remove them. https://community.multitheftauto.com/index.php?p= ... ls&id=2111 https://community.multitheftauto.com/index.php?p= ... ls&id=2110
  19. I'm sorry, but i don't get your point, what do you want to do?
  20. Castillo

    RPG???

    Scripting, or search in the MTA community, there are some modes that could help you to start. https://wiki.multitheftauto.com/wiki/Scr ... troduction https://community.multitheftauto.com/
  21. Las torretas no se pueden habilitar/desabilitar, debes crear un script para eso, pero mira aca, encontre uno https://community.multitheftauto.com/index.php?p= ... ils&id=233
  22. No entiendo, tienes varios scripts con los mismos eventos?
×
×
  • Create New...