16.08.2015, 05:27
To a 1 semana tentando corrigir esse BUG, desisti e vim aqui pedir ajuda pra vocкs
2 problemas:
1- O textdraw moneybagTD era pra estar sempre de acordo do valor do moneybag[playerid], mas nгo ta ficando, nгo sei o fucking pq
2- Nгo sei pq, mas ta contando os actores roubados, tipo se eu roubar 10 actores fica um numero 10 embaixo do mini mapa, sendo q eu nem criei essa porra
Scripts:
No topo do GM
public OnPlayerDisconnect(playerid, reason)
public DoisSegundos(playerid)
OnPlayerLogin (dps que entra certo com a sneha e tals q carrega as variaveis)
================================================== ================================================== ================================================== ===========
topo do gm
Trocar Dinheiro da moneybag pra dinheiro normal
onplayerdeath
roubando actores
2 problemas:
1- O textdraw moneybagTD era pra estar sempre de acordo do valor do moneybag[playerid], mas nгo ta ficando, nгo sei o fucking pq
2- Nгo sei pq, mas ta contando os actores roubados, tipo se eu roubar 10 actores fica um numero 10 embaixo do mini mapa, sendo q eu nem criei essa porra
Scripts:
No topo do GM
Код:
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
topo do gm
Код:
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;
}


