13.11.2013, 04:59
So, I have recently came back to SA:MP and have not messed around with PAWN for almost 2 years. Anyway, I just have been working on a gamemode for fun. Well I wanted to make a race script, so in my CreateRace function I have it as such
It returns the raceID for use with other functions.
But when I Call the function with something as such:
I have the feeling it has to do with the "FloattartPos[3]", and "legalVehicles[10] = {0,....,0}". I went in-game to test to see if it is creating everything properly, and it is as well as getting the information where its need to go for use throughout the game mode. The only thing I can think of doing is having it go "Float, Float:y, Float:z", and "legalVehicles[]" and have legal vehicles as a string I split. But this seems wasteful on resources to split a string. I have tried to find a similar issue and explanation as to why, or how to do it while subsiding the warnings. I don't wan't to hide the warnings but rather fix, but I am not sure how. [+] rep to ever can explain how to do it properly, as well explain why the method above is creating the warnings. I am here to learn, not to be annoying.
pawn Код:
stock CreateRace(racename[], Float:startPos[3], minimumRaces = 2, maxracelength = (1000 * 60 * 3), legalVehicles[10] = {0,0,0,0,0,0,0,0,0,0})
But when I Call the function with something as such:
pawn Код:
new bump1 = CreateRace("Bump 1", {1747.3285,1452.9128,10.9435}, 1, (1000 * 60 * 3), {522, 0, 0, 0, 0, 0, 0, 0, 0, 0});
new bump2 = ...
...