Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //CreateVarObjectEx and GetObjectModelID made by BigETIĀ©
- //Defines
- #define UseBrackets if(negative != positive)
- #define CreateVarObjectEx(%0,%1,%2); UseBrackets\
- {\
- %0 = CreateObject(%1,%2);\
- gObjectModelID[%0] = %1;\
- }
- //News
- new bool:negative = false, bool:positive = true; //some variables to make the define UseBrackets useable without annoying warning messages.
- new gObjectModelID[MAX_OBJECTS]; //This stores the model ID of the listed objects
- new obj; //This should store the ID of your object below.
- //Stocks
- stock GetObjectModelID(objectid) return gObjectModelID[objectid];
- //Publics (also in this case some examples)
- public OnGameModeInit()
- {
- CreateVarObjectEx(obj, 16094, 191.190430, 1870.044922, 29.056709, 0.0000, 0.0000, 0.0000, 300.0); //Your Object
- MoveObject(obj, 117.453537, 1960.304199, 19.011192); //Object move example
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- new str[128];
- format(str, sizeof(str), "Object ID: %d; Model: %d, has been moved.", objectid, GetObjectModelID(objectid));
- SendClientMessageToAll(0xFF0000FF, str);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment