new PlayerText: MoneyBagTD[MAX_PLAYERS];
PlayerTextDrawDestroy(playerid, MoneyBagTD[playerid]);
// money bag TD new mbstring[128]; format(mbstring, sizeof(mbstring), "BAG:$%08d", moneybag[i]); PlayerTextDrawSetString(playerid, MoneyBagTD[playerid], mbstring); PlayerTextDrawSetProportional(i, MoneyBagTD[i], 1); PlayerTextDrawShow(i, MoneyBagTD[i]);
MoneyBagTD[playerid] = CreatePlayerTextDraw(playerid, 440.000000, 422.000000, "88"); PlayerTextDrawBackgroundColor(playerid, MoneyBagTD[playerid], 255); PlayerTextDrawFont(playerid, MoneyBagTD[playerid], 3); PlayerTextDrawLetterSize(playerid, MoneyBagTD[playerid], 0.699998, 2.399998); PlayerTextDrawColor(playerid, MoneyBagTD[playerid], -16776961); PlayerTextDrawSetOutline(playerid, MoneyBagTD[playerid], 1); PlayerTextDrawSetProportional(playerid, MoneyBagTD[playerid], 1); // PlayerTextDrawAlignment ~ PlayerTextDrawSetShadow
new moneybag[MAX_PLAYERS];
if(PlayerToPoint(10.0, playerid,2445.7332,-1759.4276,13.5907) || PlayerToPoint(10.0, playerid,2482.0786,-1464.0013,24.0162) || PlayerToPoint(10.0, playerid,1997.3832,-2079.2957,13.5469) || PlayerToPoint(10.0, playerid,990.1533,-1520.8904,13.5508) )
{
new moneylavado = moneybag[playerid] / 2;
GivePlayerMoneyEx(playerid, moneylavado);
moneybag[playerid] = 0;
}
moneybag[playerid] = 0;
//new targetplayer = GetPlayerTargetPlayer(i);
new targetplayer = GetPlayerTargetActor(playerid);
if(IsValidActor(targetplayer) )
{
if(IsACop(i)) return 0;
if(rouboulojinha[i] == true) return SendClientMessage(i, COLOR_WHITE, "You stole a newly store! Must wait TWO MINUTES for theft.");
if(assaltandolojinha[i] == false)
{
npcquetaroubando[i] = GetPlayerTargetActor(playerid);
//SetTimerEx("ActorRoubadoRec", 30000, 0, "i", npcquetaroubando[i]);
if(strcmp(currentActorAnim[npcquetaroubando[i]], "handsup")) return SendClientMessage(playerid, COLOR_GREY, "Este NPC jб estб sendo roubado!");
SetActorSpecialAnimation(npcquetaroubando[i], SPECIAL_ACTION_HANDSUP);
//ApplyActorAnimation(npcquetaroubando[i], "PED", "handsup", 4.1, 0, 0, 0, 0, 0);
pertodonpc[i] = GetPlayerInterior(i);
assaltandolojinha[i] = true;
// crime
wanted[i] += 1;
//PlayerPlaySound(playerid, 100008, 0.0, 0.0, 0.0); // " OH NO MAN ! "
PlayerPlaySound(i, 100013, 0.0, 0.0, 0.0); // " What Are You Doing?!
SetTimerEx("AssaltandoLoja", 5000, 0, "i", i);
ShowPlayerProgressBar(i, progresso[i]);
TextDrawShowForPlayer(i, ProgressoTexto[i]);
}
}
forward AssaltandoLoja(playerid);
public AssaltandoLoja(playerid) {
new string[128];
//PlayerPlaySound(playerid, 100013, 0.0, 0.0, 0.0); // " What Are You Doing?!
if(progressovalue[playerid] <= 99) {
if(GetPlayerInterior(playerid) == pertodonpc[playerid]) {
progressovalue[playerid] += 25.0;
SetPlayerProgressBarValue(playerid, progresso[playerid], progressovalue[playerid]);
ShowPlayerProgressBar(playerid, progresso[playerid]);
SetTimerEx("AssaltandoLoja", 5000, 0, "i", playerid);
}
else {
progressovalue[playerid] = 0;
SetPlayerProgressBarValue(playerid, progresso[playerid], progressovalue[playerid]);
HidePlayerProgressBar(playerid, progresso[playerid]);
TextDrawHideForPlayer(playerid, ProgressoTexto[playerid]);
format(string, sizeof(string), "~r~Misson Fail! Wait to try again!");
assaltandolojinha[playerid] = false;
rouboulojinha[playerid] = true;
SetTimerEx("AssaltarLojaExausted", 120000, 0, "i", playerid);
CRIMINALskills[playerid] -= 1;
format(string, sizeof(string), "Current Criminal Skill: %i", CRIMINALskills[playerid] );
SendClientMessage(playerid, COLOR_NEWS, string);
ClearActorAnimations(npcquetaroubando[playerid]);
npcquetaroubando[playerid] = 0;
}
}
else if(progressovalue[playerid] >= 100) {
//DestroyPlayerProgressBar(playerid, progresso[playerid]);
progressovalue[playerid] = 0;
SetPlayerProgressBarValue(playerid, progresso[playerid], progressovalue[playerid]);
HidePlayerProgressBar(playerid, progresso[playerid]);
TextDrawHideForPlayer(playerid, ProgressoTexto[playerid]);
if(GetPlayerInterior(playerid) == pertodonpc[playerid]) {
moneybag[playerid] += rand(5000, 10000);
assaltandolojinha[playerid] = false;
rouboulojinha[playerid] = true;
SetTimerEx("AssaltarLojaExausted", 120000, 0, "i", playerid);
format(string, sizeof(string), "~r~Mission Complete! Change your money bag in a money lad!");
GameTextForPlayer(playerid, string, 1500, 3);
CRIMINALskills[playerid] += 1;
format(string, sizeof(string), "Current Criminal Skill: %i", CRIMINALskills[playerid] );
SendClientMessage(playerid, COLOR_NEWS, string);
SetTimerEx("AssaltarLojaExausted", 120000, 0, "i", playerid);
PlayerPlaySound(playerid, 100010, 0.0, 0.0, 0.0); // " This is not good "
ClearActorAnimations(npcquetaroubando[playerid]);
npcquetaroubando[playerid] = 0;
}
}
return 1;
}
// render actor
stock strcpy(dest[], const source[], maxlength=sizeof dest)
{
strcat((dest[0] = EOS, dest), source, maxlength);
}
new currentActorAnim[MAX_ACTORS][24];
stock ApplyActorAnimationEx(actorid, lib[], anim[], Float:fDelta, loop, lockx, locky, freeze, time)
{
strcpy(currentActorAnim[actorid], anim);
return ApplyActorAnimation(actorid, lib, anim, fDelta, loop, lockx, locky, freeze, time);
}
#if defined _ALS_ApplyActorAnimation
#undef ApplyActorAnimation
#else
#define _ALS_ApplyActorAnimation
#endif
#define ApplyActorAnimation ApplyActorAnimationEx
// /
// money bag TD new mbstring[128]; format(mbstring, sizeof(mbstring), "BAG:$%08d", moneybag[i]); PlayerTextDrawSetString(playerid, MoneyBagTD[playerid], mbstring); PlayerTextDrawSetProportional(i, MoneyBagTD[i], 1); TextDrawHideForPlayer(i, MoneyBagTD[i]); PlayerTextDrawShow(i, MoneyBagTD[i]);
1- moneybag[playerid]6652 ... TD = 5098 2- moneybag[playerid]12614 ... 11885
moneybag[playerid] += rand(5000, 10000);
stock rand(min, max) {
return random(max - min) + min;
}
CMD:lavardinheiro(playerid) {
if(PlayerToPoint(10.0, playerid,2445.7332,-1759.4276,13.5907) || PlayerToPoint(10.0, playerid,2482.0786,-1464.0013,24.0162) || PlayerToPoint(10.0, playerid,1997.3832,-2079.2957,13.5469) || PlayerToPoint(10.0, playerid,990.1533,-1520.8904,13.5508) )
{
new moneylavado = moneybag[playerid] / 2;
GivePlayerMoneyEx(playerid, moneylavado);
moneybag[playerid] = 0;
}
|
format(mbstring, sizeof(mbstring), "BAG:$%08d", moneybag[i]); PlayerTextDrawSetString(playerid, MoneyBagTD[playerid], mbstring); |