Object help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Object help (
/showthread.php?tid=604310)
Object help -
Razor_Sebi - 03.04.2016
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.
Re: Object help -
Harty - 05.04.2016
You must give it a variable.
Re: Object help -
introzen - 05.04.2016
PHP код:
new backpack[MAX_PLAYERS];
CMD:backpack(playerid, params[]) {
backpack[playerid] = CreateObject(..... .. .. . .. . );
return 1;
}
CMD:toys(playerid, params[]) {
DestroyObject(backpack[playerid]);
return 1;
}