Jump to content

12p

Members
  • Posts

    2,608
  • Joined

  • Last visited

Everything posted by 12p

  1. @Troold: Fixed! Download last version and now you will see that you get rank and cash. Thanks for reporting bugs. PS: You will get a new rank killing 10 zombies, 100 zombies, 1000 zombies, etc... Until you get the million. That's the last rank. I hope you have fun making zombie suffering .
  2. You are SURE that you added that line to the code? There must be something like this: <group name="Admin"> <acl name="Moderator" /> <acl name="SuperModerator" /> <acl name="Admin" /> <acl name="RPC" /> <object name="resource.admin" /> <object name="resource.webadmin" /> [b] <object name="resource.ZA" />[/b] </group> If there is ANY mistake on that, then the resource won't be able to register. No, that's all. If it don't work, is not caused for my resource. Maybe a problem on your server, or something like that.
  3. Oh, yes, SPAWNPOINTS ARE BACK, man, ARE BACK! Thx Sloth!! Thx a lot.
  4. I forgot that... Okay, you must do this: Go to "server\mods\deathmatch", then open "acl.xml". There are some lines, like this: You must add this line: Then, reset your server and try again. Thank you for remembering me that.
  5. Your CLEO is excellent. I have an idea: the Mission Creator o_O. Nah, too hard. Maybe the Leatherface/Pigsy CLEO Mod? That's would be cool. Really, your CLEO Mod script is AWESOME!
  6. LOL! I did not... But is a bit hard to me learning via reading, I learn well when I fail, because... English is not my native language, so is a bit hard to read english books, more programming books or texts. But I can understand everything that another person says, even if he's talking about programming (because they tell me it with easy words ). Okay, I'll try to understand those links (sorry for not reading it ). Thank you for your helping.
  7. executeSQLUpdate ( "zKills", "player = 'name', rank = 'rank', kills = 'zombieKills'" ) executeSQLUpdate: is to update the actual stats of the player (the kills, the rank and the name) "zkills" is the table that I made in the SQL, that contains the columns "player", "rank", and "kills". 'name', 'rank', and 'zombieKills' are predefined variables/columns: name = getPlayerName(killer) rank = getElementData(killer,"rank") zombieKills = getElementData(killer, "zombieKills") Well, what I'm doing there? I'm trying to update SQL data from the actual data of the player (defined by variables, because there are some troubles using complete sintax of functions), that is saved in the server as temporal data (I guess). But I don't know why it doesn't work.
  8. OK, I understand that. And I know that is a bit hard to teach that theme. PS: Anyway, I'm understanding how SQL works. Maybe is not too hard teach TO ME that. PS2: Does LUA is based in C?
  9. 12p

    0

    Look at this topic. Is not bad to read more... https://forum.multitheftauto.com/viewtopic.php?f=91&t=26541
  10. OK, now it works fine. EDIT: LAST THING... I'm making that the SQL saves your actual state on each killing, but... Error at line 21 (executeSQLUpdate): Bad argument. addEventHandler ("onResourceStart",getRootElement(), function () executeSQLCreateTable ("zKills","player BLOB,rank TEXT,kills INTEGER") end) addEvent("onZombieWasted") addEventHandler( "onZombieWasted", getRootElement(), function (killer) name = getPlayerName(killer) rank = getElementData(killer,"rank") zombieKills = getElementData(killer, "zombieKills") if (zombieKills == "" or zombieKills == nil or zombieKills == false) then zombieKills = 0 end givePlayerMoney (killer, 25); setElementData (killer,"zombieKills",zombieKills+1) result = executeSQLSelect ( "zKills", "player", "player = 'name'" ) if ( result == false ) then executeSQLInsert ( "zKills", "'name', 'rank', 'zombieKills'" ) else executeSQLUpdate ( "zKills", "player = 'name', rank = 'rank', kills = 'zombieKills'" ) end if (getElementData (killer,"zombieKills") == 10) then setElementData (killer,"rank","Noob") outputChatBox ("New rank! "..getPlayerName(killer).." is now a Noob. He has killed 10 zombies.") outputChatBox ("Congratulations for your new rank! You get $500 as reward.",killer,0,255,0) givePlayerMoney (killer,500) elseif (getElementData (killer,"zombieKills") == 100) then setElementData (killer,"rank","Beginner") outputChatBox ("New rank! "..getPlayerName(killer).." is now a Beginner. He has killed 100 zombies.") outputChatBox ("Congratulations for your new rank! You get $1000 as reward.",killer,0,255,0) givePlayerMoney (killer,1000) elseif (getElementData (killer,"zombieKills") == 1000) then setElementData (killer,"rank","Medium") outputChatBox ("New rank! "..getPlayerName(killer).." is now a Medium. He has killed 1000 zombies.") outputChatBox ("Congratulations for your new rank! You get $5000 as reward.",killer,0,255,0) givePlayerMoney (killer,5000) elseif (getElementData (killer,"zombieKills") == 10000) then setElementData (killer,"rank","Experiencied") outputChatBox ("New rank! "..getPlayerName(killer).." is now an Expert. He has killed 10000 zombies.") outputChatBox ("Congratulations for your new rank! You get $50000 as reward.",killer,0,255,0) givePlayerMoney (killer,50000) elseif (getElementData (killer,"zombieKills") == 100000) then setElementData (killer,"rank","Assassin") outputChatBox ("New rank! "..getPlayerName(killer).." is now an Assassin. He has killed 1000000 zombies.") outputChatBox ("Congratulations for your new rank! You get $500000 as reward.",killer,0,255,0) givePlayerMoney (killer,500000) elseif (getElementData (killer,"zombieKills") == 1000000) then setElementData (killer,"rank","God") outputChatBox ("New rank! "..getPlayerName(killer).." is now a God. He has killed one million zombies!!!") outputChatBox ("Congratulations for your new rank! You get $1000000 as reward.",killer,0,255,0) givePlayerMoney (killer,1000000) end end ) Thanks for helping me. And sorry for asking too much for help, but I'm just learning how LUA works, and I'm learning fast, too.
  11. It works fine, but when I try this... addEvent( "onZombieWasted" ); addEventHandler( "onZombieWasted", getRootElement(), function (killer) if (zombieKills == "" or zombieKills == nil or zombieKills == false) then zombieKills = 0 end givePlayerMoney(killer, 25); setElementData (killer,"zombieKills",zombieKills+1) if (getElementData (killer,"zombieKills") == 10) then setElementData (killer,"rank","Noob") outputChatBox ("New rank! "..getPlayerName(killer).." is a Noob. He killed 10 zombies.") elseif (getElementData (killer,"zombieKills") == 100) then setElementData (killer,"rank","Beginner") outputChatBox ("New rank! "..getPlayerName(killer).." is a Beginner. He killed 100 zombies.") elseif (getElementData (killer,"zombieKills") == 1000) then setElementData (killer,"rank","Medium") outputChatBox ("New rank! "..getPlayerName(killer).." is a Medium. He killed 1000 zombies.") elseif (getElementData (killer,"zombieKills") == 10000) then setElementData (killer,"rank","Experiencied") outputChatBox ("New rank! "..getPlayerName(killer).." is an Experienced. He killed 10000 zombies.") elseif (getElementData (killer,"zombieKills") == 100000) then setElementData (killer,"rank","Assassin") outputChatBox ("New rank! "..getPlayerName(killer).." is an Assassin. He killed 1000000 zombies.") elseif (getElementData (killer,"zombieKills") == 1000000) then setElementData (killer,"rank","God") outputChatBox ("New rank! "..getPlayerName(killer).." is a God. He killed one million zombies!!!") end end ) It stops working fine D:. There is no Warnings or Errors shown in "debugscript 3" mode. But it doesn't show me when I got a new rank... What's going on now? Thanks to you for trying do the best.
  12. LOL! You answered me when I discovered it for myself . Thanks mate. But maybe I will ask for help later, so don't close this thread. EDIT: NO! the problem stills... addEvent( "onZombieWasted" ); addEventHandler( "onZombieWasted", getRootElement(), function (killer) zombieKills = 0 givePlayerMoney( killer, 25 ); setElementData (killer,"zombieKills",true,zombieKills+1) if (getElementData (killer,"zombieKills") == 1) then outputChatBox ("New rank! "..getPlayerName(killer).." is a Noob Killer. He killed 1 zombie.") setElementData (killer,"rank",noobKiller) end end) FULL CODE.
  13. Hi guys, I'm here again . Now I'm trying to make a Rank System so users have a motivation to continue playing. Well, this is my code. addEventHandler( "onZombieWasted", getRootElement(), function (killer) zombieKills = 0 givePlayerMoney( killer, 25 ); setElementData (killer,"zombieKills",true,zombieKills+1) if (getElementData (killer,zombieKills) == 1) then outputChatBox ("New rank! "..getPlayerName(killer).." is a Noob Killer. He killed 1 zombie.") setElementData (killer,"rank",noobKiller) end end) Console gives me ERROR at "getElementData": Bad argument. Can you tell me what's going bad here? Thanks
  14. Old, crappy gamemode. Don't download it, or your server will look like completely garbage.
  15. 12p

    Spawn trouble D:

    , thanks 50p. Thank you very much. Please close this thread, is solved.
  16. 12p

    Spawn trouble D:

    Well, guys, It's me again . I'm okay, I'm learning how LUA works, and I'm progressing, but I have 1 problem... Look at this code: function respawn (player) fadeCamera(player,true,1,255,255,255) spawnPlayer(player,2314.75+math.random(-1,1), -6.43+math.random(-1,1), 26.74, 180, 285) setCameraTarget(player, player) end addEventHandler("onPlayerWasted", root, function () setTimer (respawn,3000,1,source) end) My objetive with that code, is to make the player spawn when he dies, after 3 seconds, and fade the camera before that. Everything works good but the Fade Out effect... what's bad in that code? Thank you beforehand.
  17. 12p

    Help... please.

    No, I don't get any error... Or that's what the console tells me. ¬_¬, but the PED doesn't play the animation... Does a collision stops animations on local PEDs? EDIT: I will leave that try of setting PED animation. Thanks for the help. By now, I'm ok.
  18. 12p

    Help... please.

    No, it doesn't work . But thanks. EDIT: I solved it. The problem was the "local" thing . I must not put "local" in the elements used in another parts of the code. Now I have another problem (sorry ): my ped "vendedorArmas" (down the new code) doesn't do the animation I tell him to do. The block is right, the animation name is right too, why it doesn't work? local banquera = createPed (172,2318.3, -15.36, 27.74) setPedRotation (banquera,90) local vendedorArmas = createPed (73,2306.7954101,-2.43528,27.7021875) setPedRotation (vendedorArmas, 270) setPedAnimation (vendedorArmas, "MISC", "SEAT_LR", -1, true, false, false) puerta = createObject (5856,2304.2231445313,-15.65851020813,27.748359680176) markerEntrar = createMarker (2304.2231445313,-15.65851020813,26.748359680176,'cylinder',2,0,0,0,0) function entrar1 () moveObject (puerta,1000,2304.2231445313,-12.65851020813,27.748359680176) end addEventHandler ('onMarkerHit', markerEntrar, entrar1) function entrar2 () moveObject (puerta,1000,2304.2231445313,-15.65851020813,27.748359680176) end addEventHandler ("onMarkerLeave",markerEntrar, entrar2)
  19. 12p

    Help... please.

    Hi everybody. I'm beginning in the LUA "World" and I'm doing a scripted map. Well, my problem is this: when I start that map, the console tells me "WARNING: Bad Argument @ addEventHandler (string-defined function)" 2 times. By some ways, I discovered that those "addEventHandler"s are these: addEventHandler ('onMarkerHit', markerEntrar, entrar1) function entrar1 () moveObject (puerta,1000,2304.2231445313,-12.65851020813,27.748359680176) end addEventHandler ("onMarkerLeave",markerEntrar, entrar2) function entrar2 () moveObject (puerta,1000,2304.2231445313,-15.65851020813,27.748359680176) end If you can help me, I will really regreet to everybody. PS: Here is my full code by now: addEventHandler ("onResourceStart", getResourceRootElement(getThisResource()), function () local banquera = createPed (172,2318.3, -15.36, 27.74) setPedRotation (banquera,90) local vendedorArmas = createPed (73,2306.7954101,-2.43528,27.7021875) setPedRotation (vendedorArmas, 270) setPedAnimation (vendedorArmas, "MISC", "SEAT_LR", -1, true, false, false) local puerta = createObject (5856,2304.2231445313,-15.65851020813,27.748359680176) local markerEntrar = createMarker (2304.2231445313,-15.65851020813,26.748359680176,'cylinder',2,0,0,0,0) end) addEventHandler ('onMarkerHit', markerEntrar, entrar1) function entrar1 () moveObject (puerta,1000,2304.2231445313,-12.65851020813,27.748359680176) end addEventHandler ("onMarkerLeave",markerEntrar, entrar2) function entrar2 () moveObject (puerta,1000,2304.2231445313,-15.65851020813,27.748359680176) end PS2: No, it doesn't tell me what's the bad line.
  20. I have 4 ideas for that. 1.-There is the object 1210 (a briefcase that is supposed to contains the cure). 2.-There is, too, the object 1241 (an adrenaline tablet, that can be the cure too). 3.-The object 2976 ("green gloop", I don't know how to describe it ). 4.-And objects 1575, 1576, 1577, 1578, 1579, and 1580 (drug packets). And the cure can be putted in the map by an EDF definition.
  21. Hey slothman, I have an idea for this resource... Any kind of "infection system"? When you are attacked by an zombie, you slowly lose your life, excepting if you get the cure. Is useful for a more realistic style, like in Resident Evil movies... I hope you take my idea in your next version...
  22. No. It takes 1 second, before I be timed out from my own server. The same happens if I use the "slothbot" resource (u_u)... PS: 1 GB RAM, 256 MB Video, 2.5 GHz. That's my computer.
  23. BUG?? When I start it on my server (last version), my client stop loading the resource, and a error box says: "Error downloading requested files." and something more... It's strange. Can you help me? Thx.
  24. Oh, it's true. I forgot that ultra useful script ñ_ñ. Thanks slothman!
×
×
  • Create New...