Attach Moneybag
#1

solved
Reply
#2

Try this:

pawn Код:
new Moneybag;

Moneybag = CreateObject(1550, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); //<<======================
AttachObjectToPlayer(Moneybag, playerid, -0.300999,0.337999,-0.093999, 0.000000,-90.400001,166.100006);//<<==============
Reply
#3

pawn Код:
new yourobject;
CMD:robstore(playerid,params[])
{
    if(gteam[playerid] != TEAM_CIV) return SendClientMessage(playerid,COLOR_RED,"(Error): You must be civilian to use this command!");
    if(!IsPlayerNearAnyRobberyArea(playerid)) return ErrorMessages(playerid,5);
    if(GetPlayerWantedLevel(playerid) >= 3) return ErrorMessages(playerid,7);
    if(alreadyrobbed[playerid] && gettime() < alreadyrobbed[playerid])return SendClientMessage(playerid,COLOR_RED,"(Error): You have already robbed a shop!Try Later!");
    if(Player_CountDown[playerid] != -1) return SendClientMessage(playerid, COLOR_RED, "(Error): Please wait until the robbery you've started gets finished.");
    Player_CountDown[playerid] = 30;
    yourobject = CreateObject(1550, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); //<<======================
    AttachObjectToPlayer(yourobject, playerid, -0.300999,0.337999,-0.093999, 0.000000,-90.400001,166.100006);//<<==============
    PlayerTimer_CountDown[playerid] = SetTimerEx("countdown", 1000, true, "i", playerid);
    SetPlayerProgressBarValue(playerid,bar[playerid],0);
    ShowPlayerProgressBar(playerid,bar[playerid]);
    IncreasePlayerWantedLevel(playerid,4);
    alreadyrobbed[playerid] = gettime() + 120;
    SendClientMessage(playerid,-1," ("COL_GREEN"WAIT"COL_WHITE"): Please stay at the point for 30 seconds if you want the robbery to be completed!");
    GameTextForPlayer(playerid,"~r~Starting Robbery!",1000,6);
    return 1;
}
This should work.

P.S. Late post, sorry.
Reply
#4

ye i thought that but i am thinking if i need to use an array or no
Reply
#5

so ??
Reply
#6

I lend the topic a bit, I have a similar question.

How should I know the coordinates if I want to attach a object to a player?.

I mean at a specific place on the player not that the player chose with "Toy editor" I mean without it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)