Object help
#1

How can i add a function to an object?
I want to make a backpack system, but i don't know how to add a function to it and make it dissapear from the /toys

Any advice is appreciated, thank you.
Reply
#2

You must give it a variable.
Reply
#3

PHP код:
new backpack[MAX_PLAYERS];
CMD:backpack(playeridparams[]) {
    
backpack[playerid] = CreateObject(..... .. .. . .. . );
    return 
1;
}
CMD:toys(playeridparams[]) {
    
DestroyObject(backpack[playerid]);
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)