HELP needed
#1

Hello!
I need some help. Why isn't this code working?(I know it's not in english, but you should understand it anyway):
PHP код:
format(formaatsizeof(formaat),"2942, %0.f, %0.f, %0.f, %0.f, 0, 0",PangaInfo[i][pangaX],PangaInfo[i][pangaY],PangaInfo[i][pangaZ],PangaInfo[i][pangaA]);
           
CreateObject(formaat); 
error:
PHP код:
error 035argument type mismatch (argument 1
Reply
#2

Show us where you defined 'formaat'. Aswell check the following site as CreateObject() has a way more parameters.

https://sampwiki.blast.hk/wiki/CreateObject
Reply
#3

You have to strval the numbers and Floatstr for the floats.
Reply
#4

Dwane, how I can use variables in CreateObject else than format then?
Reply
#5

https://sampwiki.blast.hk/wiki/CreateObject

Just insert your variables instead of numbers.

Example:


pawn Код:
CreateObject(cobject[i][modelid], cobject[i][x], cobject[i][y], cobject[i][z], cobject[i][rotx], cobject[i][roty], cobject[i][rotz], cobject[i][drawdis]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)