SA-MP Forums Archive
Building a object? - 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: Building a object? (/showthread.php?tid=596062)



Building a object? - Joyeux - 11.12.2015

Hello everybody,
I'm working on a job system (type of roleplay), unfortunately I am a low-level scripter, for that reason I wonder how to create on a object on the player?
Example:



What should I use?
I use these functions.. Than what?
Код:
  TogglePlayerControllable(playerid,0);
            ApplyAnimation(playerid,"BASEBALL","bat_part",4.1,1,1,0,0,0);
            GameTextForPlayer(playerid, "text...", 10000, 3);
Sorry for my English, I am Italian..
In any case I hop that someone help me!


Re: Building a object? - SickAttack - 11.12.2015

https://sampwiki.blast.hk/wiki/AttachObjectToPlayer
https://sampwiki.blast.hk/wiki/SetPlayerAttachedObject
https://sampwiki.blast.hk/wiki/RemovePlayerAttachedObject
https://sampwiki.blast.hk/wiki/AttachPlayerObjectToPlayer


Re: Building a object? - Joyeux - 12.12.2015

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
It's not working, help me?
Код:
public OnPlayerEnterCheckpoint(playerid)
{
     {
          if(Job[playerid] == 1)
	  {
	      DisablePlayerCheckpoint(playerid);
	      TogglePlayerControllable(playerid,0);
              ApplyAnimation(playerid,"BASEBALL","bat_part",4.1,1,1,0,0,0);
              GameTextForPlayer(playerid, "Building... please wait..", 10000, 3);
              SetPlayerAttachedObject(playerid, 0, 2096, 1, -0.094450, 0.431860, -0.009833, 355.990570, 85.995780, 0.000000, 1.000000, 1.000000, 1.000000);
              SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
              {
	      SetPlayerCheckpoint(playerid,-1292.4602,471.7754,7.1875, 3.0);
	      }
	      return 1;
	}
	DisablePlayerCheckpoint(playerid);
	SendClientMessage(playerid,0xffffffff,"Finish Job.");
	Job[playerid] =0;
    }
    return 1;
}