Little Help
#1

Hello.Today I want to make Care Package but Object don`t want to spawn I don`t know why.Here is code

pawn Код:
GetPlayerPos(playerid,CareX,CareY,CareZ);
                    CarePack = CreateObject(3791,CareX,CareY,CareZ+10.0,0.0,0.0,0.0);
                    MoveObject(CarePack,CareX,CareY,CareZ,7.0);
Anyone can take a look.Thanks
Reply
#2

CarePack should be under OnFliterScriptInit oR OnGameModeInit cause its an object
Reply
#3

Quote:
Originally Posted by xMCx
Посмотреть сообщение
CarePack should be under OnFliterScriptInit oR OnGameModeInit cause its an object
No need to be under OnFilterScriptInit
Reply
#4

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
Nope again, objects can be dynamically created and destoryed in runtime, the only thing I can think of that needs to be created on script initiation are static vehicles and pickups (AddStaticVehicle/Pickup)

Ensure that the model ID is valid, also try spacing out your code because at first I thought you might have made the stream distance 0.0:

Код:
CreateObject(3791, CareX, CareY, CareZ+10.0, 0.0, 0.0, 0.0);
Much easier to read parameters than:
Код:
CreateObject(3791,CareX,CareY,CareZ+10.0,0.0,0.0,0.0);
I can now see that your position and rotation are fine and there is no 'streamdistance = 0.0'.

Is the player in another virtual world? Are the coordinates correct? (try printing them, though they should be if the source is GetPlayerPos) Try creating that object model in the various map editors (SA:MP Map Editor mainly) don't trust MTA as some objects that work in there may not work in SA:MP (I've come across this before)

Also, ensure you haven't reached the object limit of 500 (for global objects) you could try using a streamer such as Incognito's Streamer Plugin to avoid this problem.
I try your solution but it`s not working I don`t know why.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)