Quote:
Originally Posted by Abagail
You can do something like this:
pawn Код:
new SprayObjects[MAX_GANGS];
SprayObjects[gangid] = modelid; // set the variable to the object ID for the according tag somewhere in OnGameModeInit or OnFilterScriptInit (or just use an array)
GetSprayTagObjectIDForGang(gangid) { return SprayObjects[gangid]; }
CMD:tag(playerid, params[]) { new objectID = GetSprayTagObjectIDForGang(PlayerGang[playerid])); GangTagData[gangid][playerid] = CreateDynamicObject(objectID, x, y, z, rx, ry, rz); return 1; }
This is an example, and I repeat will NOT work as is. It is just an example to give you an idea on how this can be done.
|
I need it done as a CMD, since I don't know how to do it myself.