toxicsmoke11 Posted September 28, 2014 Share Posted September 28, 2014 hello im trying to make a script but mta hates me and doesnt want to load it paidVehicles = { {"Infernus",411,50000} } function buyVehicle(thePlayer,commandName,theVehicle) if getPlayerMoney(thePlayer) >= 50000 then for i,pvehicles in ipairs(paidVehicles) do if string.find(pvehicles[2],tostring(theVehicle)) then outputChatBox("You bought: #FF0033"..tostring(pvehicles[1]),thePlayer,255,255,255,true) local px,py,pz = getElementPosition(thePlayer) createVehicle(tonumber(theVehicle),px,py,pz) else outputChatBox("#FFFFFF"..tostring(theVehicle).."#FF0000 did not find any match in the vehicle shop.",thePlayer,255,0,true) end end else outputChatBox("#FF0000You need #FFFFFF 50000$ #FF0000 in order to buy a vehicle!",thePlayer,255,0,true) end end addCommandHandler("buyvehicle",buyVehicle) when i use /buyvehicle 411 then i get message "nil did not find any match in the vehicle shop." also you might wonder why i got only 2 number arguments in outputChatBox,well the reason is that mta is talking crap and not allowing me to script because its just evil little shit before i have used else outputChatBox("#FF0000You need #FFFFFF 50000$ #FF0000 in order to buy a vehicle!",thePlayer,255,0,0,true) end but stupid mta said that fifth argument (number 0) must be a fucking boolean which doesnt make any sense does anyone know a solution to this ridicilous madness made by mta? Link to comment
lcd1232 Posted September 28, 2014 Share Posted September 28, 2014 maybe this script on client-side? Show your meta.xml Link to comment
#DRAGON!FIRE Posted September 28, 2014 Share Posted September 28, 2014 i don't know from what .. but try this : outputChatBox("#FF0000You need #FFFFFF 50000$ #FF0000 in order to buy a vehicle!",thePlayer) and tell me what you got Link to comment
toxicsmoke11 Posted September 28, 2014 Author Share Posted September 28, 2014 no i dont want to have that then i would get an ugly colored text i had to restart my server to fix this issue,im dissapointed by mta Link to comment
#DRAGON!FIRE Posted September 28, 2014 Share Posted September 28, 2014 i know .. but try for we can see problem Link to comment
Moderators IIYAMA Posted October 2, 2014 Moderators Share Posted October 2, 2014 no i dont want to have that then i would get an ugly colored texti had to restart my server to fix this issue,im dissapointed by mta lol, restart the server, mta is disappointed in you. Link to comment
toxicsmoke11 Posted October 2, 2014 Author Share Posted October 2, 2014 no i dont want to have that then i would get an ugly colored texti had to restart my server to fix this issue,im dissapointed by mta lol, restart the server, mta is disappointed in you. it's not my fault that mta developers aren't fixing this kind of ridiculous bugs. Link to comment
Moderators IIYAMA Posted October 2, 2014 Moderators Share Posted October 2, 2014 /refreshall fixes this, afaik. Link to comment
toxicsmoke11 Posted October 2, 2014 Author Share Posted October 2, 2014 /refreshall fixes this, afaik. could you tell me whats the difference between /refresh and /refreshall ? Link to comment
Moderators IIYAMA Posted October 2, 2014 Moderators Share Posted October 2, 2014 refresh Refresh resource list to find new resources refreshall Refresh resources and restart any changed resources Link to comment
darhal Posted October 3, 2014 Share Posted October 3, 2014 Add tostring to pvehicles[2] Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now