Attach Moneybag
#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


Messages In This Thread
Attach Moneybag - by vassilis - 06.05.2014, 18:13
Re: Attach Moneybag - by awsomedude - 06.05.2014, 18:17
Re: Attach Moneybag - by DiGiTaL_AnGeL - 06.05.2014, 18:22
Re: Attach Moneybag - by vassilis - 06.05.2014, 18:24
Re: Attach Moneybag - by vassilis - 07.05.2014, 12:16
Re: Attach Moneybag - by davve95 - 07.05.2014, 12:58

Forum Jump:


Users browsing this thread: 1 Guest(s)