SA-MP Forums Archive
Help with Object and Animation. - 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: Help with Object and Animation. (/showthread.php?tid=354396)



Help with Object and Animation. - Sajeevan - 26.06.2012

Hello there, So i made this code

Код:
		SetPlayerAttachedObject(playerid,1, 19142, 1, 0.112397, 0.049958, -0.001576, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
		SetPlayerAttachedObject( playerid, 2, 1550, 1, -0.008714, -0.188819, -0.026564, 159.138153, 86.558647, 0.000000, 1.005565, 0.984468, 1.014210 ); // CJ_MONEY_BAG -
		SetPlayerAttachedObject( playerid, 3, 18637, 1, 0.000000, -0.026987, 0.152000, 89.427894, 357.510375, 273.945983, 1.000000, 1.000000, 1.000000 ); // PoliceShield1 - Shield on back
		SetPlayerAttachedObject( playerid, 4, 18634, 6, 0.045389, -0.019335, -0.246956, 0.000000, 91.442123, 85.389228, 0.971265, 1.000000, 1.000000 ); // GTASACrowbar1 - Crowbar in hand
		SetPlayerAttachedObject( playerid, 5, 1485, 18, -0.024238, -0.058657, -0.019224, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // CJ_CIGGY - cuban cigar
   	    SendClientMessage(playerid, COLOR_RED, "You've Have gave urself rob gear");
		ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0);
		SetTimerEx("MyRemoveFunc", 10 * 1000, false, "i", playerid); //replace X with the amount of seconds before the object should be removed
forward MyRemoveFunc(playerid);
public MyRemoveFunc(playerid)
{
  RemovePlayerAttachedObject(playerid, 0);
  return 1;
}
But it don't work. Im stuck with the animations and the objects.


Re: Help with Object and Animation. - Sajeevan - 26.06.2012

Bump.


Re: Help with Object and Animation. - Grand_Micha - 26.06.2012

pawn Код:
SetPlayerAttachedObject(playerid,1, 19142, 1, 0.112397, 0.049958, -0.001576, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
        SetPlayerAttachedObject( playerid, 2, 1550, 1, -0.008714, -0.188819, -0.026564, 159.138153, 86.558647, 0.000000, 1.005565, 0.984468, 1.014210 ); // CJ_MONEY_BAG -
        SetPlayerAttachedObject( playerid, 3, 18637, 1, 0.000000, -0.026987, 0.152000, 89.427894, 357.510375, 273.945983, 1.000000, 1.000000, 1.000000 ); // PoliceShield1 - Shield on back
        SetPlayerAttachedObject( playerid, 4, 18634, 6, 0.045389, -0.019335, -0.246956, 0.000000, 91.442123, 85.389228, 0.971265, 1.000000, 1.000000 ); // GTASACrowbar1 - Crowbar in hand
        SetPlayerAttachedObject( playerid, 5, 1485, 18, -0.024238, -0.058657, -0.019224, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // CJ_CIGGY - cuban cigar
        SendClientMessage(playerid, COLOR_RED, "You've Have gave urself rob gear");
        ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 0, 1, 1, 1, 1);
        SetTimerEx("MyRemoveFunc", 10 * 1000, false, "i", playerid); //replace X with the amount of seconds before the object should be removed
forward MyRemoveFunc(playerid);
public MyRemoveFunc(playerid)
{
RemovePlayerAttachedObject(playerid, 1);
RemovePlayerAttachedObject(playerid, 2);
RemovePlayerAttachedObject(playerid, 3);
RemovePlayerAttachedObject(playerid, 4);
RemovePlayerAttachedObject(playerid, 5);
return 1;
}
I still do not get what you want to do.


Re: Help with Object and Animation. - San1 - 26.06.2012

Lol this is my code u just edited it but dont save its ur code

SendClientMessage(playerid, COLOR_RED, "You've Have gave urself rob gear");
Thats my Message i orginally had please dont take credits


Re: Help with Object and Animation. - Grand_Micha - 26.06.2012

I am running a server with an average of 50 people, so I will not need your line. I actually edited your post so you could copy it, you genius.