07.07.2013, 09:06
I guess this should work, tell me the results:
And simply add to your command:
To destroy it when the player dies:
I DO NOT take credits for the function, I've once seen it on a thread, and I thought it would be useful for my GM as well, however I never got to use it. Try it!
ALTOUGH you first might need to use CreateObject, the function looks strange to me, use CreateObject for FireObject, AND THEN attach IT!
pawn Код:
forward SetPlayerOnFire(playerid);
new FireObject[MAX_PLAYERS];
public SetPlayerOnFire(playerid)
{
FireObject[playerid]=SetPlayerAttachedObject(playerid, 4, 18692, 1, -0.540414, -0.340681, -1.580088, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
return 1;
}
pawn Код:
SetPlayerOnFire(playerid);
pawn Код:
DestroyObject(FireObject[playerid]);
ALTOUGH you first might need to use CreateObject, the function looks strange to me, use CreateObject for FireObject, AND THEN attach IT!