Advertisement
Synchr0

Tabbles

Nov 16th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. local nPizzaPickup = {
  2.     createPickup ( -1088.5999755859, 428.20001220703, 13.60000038147, 3, 1582 ),
  3.     createPickup ( -1067.5, 407.20001220703, 13.60000038147, 3, 1582 )
  4. }
  5. --------------------------------------------------------------------------------------
  6. local nPizzaFound = { { } }-- is this possible?
  7. ----------------------
  8. function onPlayerPickupPizza ( thePickup )
  9.     for iii = 1, #nPizzaPickup do--<<
  10.         if thePickup == nPizzaPickup[source][iii] then--is this possible?
  11.            
  12.             if nPizzaFound[source][iii] == true then
  13.                 outputChatBox ( "* You already found this pizza.", source )
  14.                 return true
  15.             end
  16.             --
  17.             outputChatBox ( "* You found the pizza " .. iii .. ". Here, have some money.", source )
  18.             givePlayerMoney ( source, 500 )
  19.             nPizzaFound[source][iii] = true
  20.         end
  21.     end
  22. end
  23. addEventHandler ( "onPlayerPickupHit", getRootElement(), onPlayerPickupPizza )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement