06.05.2014, 18:13
(
Последний раз редактировалось vassilis; 27.01.2015 в 04:09.
)
solved
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);//<<==============
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;
}