Passar empresa -
SukMathcuck - 14.12.2014
eae pessoal, hoje estava a procura de um simples sistema(ou atй comando) de passar empresa para outra pessoa(Sbizz e Bizz no GM Godfather), pesquisei no ****** e no fуrum nгo encontrei algo do tipo, caso tenha alguйm que posso me ajudar com esse sistema, dou umas +reps..
Re: Passar empresa -
paulotuto - 15.12.2014
Eu tmb uso a gm godfather mais com mais coisa cara.... e tem sim um sistema assim
Re: Passar empresa -
SukMathcuck - 15.12.2014
Entгo, eu estou a procura de tipo um comando de passar empresa.
Re: Passar empresa -
viniciuship - 15.12.2014
Cara a maioria dos GM tem o comando /admvempresa talvez o seu tenha tambйm
Re: Passar empresa -
SukMathcuck - 15.12.2014
Tipo, eu fiz isso rapidamente, com base de outros codigos e deu isso..
pawn Код:
if (strcmp(cmd, "/passarempresa", true) == 0)
{
if (IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USE: /passarempresa [id]");
return true;
}
new playa;
new Float: slx,
Float: sly,
Float: slz;
playa = ReturnUser(tmp);
if(PlayerInfo[playerid][pPbiskey] == 255)
{
SendClientMessage(playerid,COLOR_GRAD3,"Vocк nгo possui uma empresa propria");
return true;
}
if(PlayerInfo[playerid][pMarried] > 0)
{
SendClientMessage(playerid,COLOR_GRAD4,"Vocк й um cara casado e nгo pode vender isso");
return true;
}
if (IsPlayerConnected(playa))
{
if (playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
for (new b = 0; b < sizeof(SBizzInfo); b++)
{
if (PlayerToPoint(3.0, playerid, SBizzInfo[b][sbEntranceX], SBizzInfo[b][sbEntranceY], SBizzInfo[b][sbEntranceZ]) && SBizzInfo[b][sbOwned] == 0)
{
if (GetPlayerMoneyEx(playa) > SBizzInfo[b][sbBuyPrice])
{
PlayerInfo[playerid][pPbiskey] = b + 100;
SBizzInfo[b][sbOwned] = 1;
strmid(SBizzInfo[b][sbOwner], giveplayer, 0, strlen(giveplayer), 255);
GivePlayerMoneyEx(playa, -SBizzInfo[b][sbBuyPrice]);
GivePlayerMoneyEx(playerid, +SBizzInfo[b][sbBuyPrice]);
SendClientMessage(playerid, COLOR_WHITE, "Vocк vendeu sua empresa.");
DateProp(playerid);
OnPropUpdate();
OnPlayerUpdate(playerid);
return true;
}
else
{
format(string, sizeof(string), "O jogador nгo tem dinheiro suficiente.", SBizzInfo[b][sbBuyPrice]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return 1;
}
}
}
for (new b = 0; b < sizeof(BizzInfo); b++)
{
if (PlayerToPoint(3.0, playerid, BizzInfo[b][bEntranceX], BizzInfo[b][bEntranceY], BizzInfo[b][bEntranceZ]) && BizzInfo[b][bOwned] == 0)
{
if (GetPlayerMoneyEx(playa) > BizzInfo[b][bBuyPrice])
{
PlayerInfo[playerid][pPbiskey] = b;
BizzInfo[b][bOwned] = 1;
strmid(BizzInfo[b][bOwner], giveplayer, 0, strlen(giveplayer), 255);
GivePlayerMoneyEx(playerid, -BizzInfo[b][bBuyPrice]);
SendClientMessage(playerid, COLOR_WHITE, "Vocк vendeu sua empresa.");
DateProp(playerid);
OnPropUpdate();
OnPlayerUpdate(playerid);
return true;
}
else
{
format(string, sizeof(string), "O jogador nгo tem dinheiro suficiente.", BizzInfo[b][bBuyPrice]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Vocк nгo estб perto de sua empresa.");
}
}
}
}
return true;
}
Queria que o cara sу podia usar esse comando se ele tivesse na empresa
'dele' e nгo em qualquer outra empresa, oque fiz ae tб meio certo?
Re: Passar empresa -
SukMathcuck - 15.12.2014
Quote:
Originally Posted by SukMathcuck
Tipo, eu fiz isso rapidamente, com base de outros codigos e deu isso..
pawn Код:
if (strcmp(cmd, "/passarempresa", true) == 0) { if (IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if (!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USE: /passarempresa [id]"); return true; } new playa; new Float: slx, Float: sly, Float: slz; playa = ReturnUser(tmp); if(PlayerInfo[playerid][pPbiskey] == 255) { SendClientMessage(playerid,COLOR_GRAD3,"Vocк nгo possui uma empresa propria"); return true; } if(PlayerInfo[playerid][pMarried] > 0) { SendClientMessage(playerid,COLOR_GRAD4,"Vocк й um cara casado e nгo pode vender isso"); return true; } if (IsPlayerConnected(playa)) { if (playa != INVALID_PLAYER_ID) { GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); for (new b = 0; b < sizeof(SBizzInfo); b++) { if (PlayerToPoint(3.0, playerid, SBizzInfo[b][sbEntranceX], SBizzInfo[b][sbEntranceY], SBizzInfo[b][sbEntranceZ]) && SBizzInfo[b][sbOwned] == 0) { if (GetPlayerMoneyEx(playa) > SBizzInfo[b][sbBuyPrice]) { PlayerInfo[playerid][pPbiskey] = b + 100; SBizzInfo[b][sbOwned] = 1; strmid(SBizzInfo[b][sbOwner], giveplayer, 0, strlen(giveplayer), 255); GivePlayerMoneyEx(playa, -SBizzInfo[b][sbBuyPrice]); GivePlayerMoneyEx(playerid, +SBizzInfo[b][sbBuyPrice]); SendClientMessage(playerid, COLOR_WHITE, "Vocк vendeu sua empresa."); DateProp(playerid); OnPropUpdate(); OnPlayerUpdate(playerid); return true; } else { format(string, sizeof(string), "O jogador nгo tem dinheiro suficiente.", SBizzInfo[b][sbBuyPrice]); SendClientMessage(playerid, COLOR_GRAD5, string); return 1; } } } for (new b = 0; b < sizeof(BizzInfo); b++) { if (PlayerToPoint(3.0, playerid, BizzInfo[b][bEntranceX], BizzInfo[b][bEntranceY], BizzInfo[b][bEntranceZ]) && BizzInfo[b][bOwned] == 0) { if (GetPlayerMoneyEx(playa) > BizzInfo[b][bBuyPrice]) { PlayerInfo[playerid][pPbiskey] = b; BizzInfo[b][bOwned] = 1; strmid(BizzInfo[b][bOwner], giveplayer, 0, strlen(giveplayer), 255); GivePlayerMoneyEx(playerid, -BizzInfo[b][bBuyPrice]); SendClientMessage(playerid, COLOR_WHITE, "Vocк vendeu sua empresa."); DateProp(playerid); OnPropUpdate(); OnPlayerUpdate(playerid); return true; } else { format(string, sizeof(string), "O jogador nгo tem dinheiro suficiente.", BizzInfo[b][bBuyPrice]); SendClientMessage(playerid, COLOR_GRAD5, string); return 1; } } } else { SendClientMessage(playerid, COLOR_WHITE, "Vocк nгo estб perto de sua empresa."); } } } } return true; }
Queria que o cara sу podia usar esse comando se ele tivesse na empresa 'dele' e nгo em qualquer outra empresa, oque fiz ae tб meio certo?
|
Alguйm pf?..
Re: Passar empresa -
SukMathcuck - 15.12.2014
Alguem? ?
Re: Passar empresa -
SukMathcuck - 12.04.2015
+ um up!
Re: Passar empresa -
n0minal - 12.04.2015
kkkkk esperou 4 meses pra dar bump... Enfim, amanhг de manhг dou uma olhada e te digo se ainda nгo tiver resolvido...
Re: Passar empresa -
SukMathcuck - 12.04.2015
Quote:
Originally Posted by ipsLeon
kkkkk esperou 4 meses pra dar bump... Enfim, amanhг de manhг dou uma olhada e te digo se ainda nгo tiver resolvido...
|
rsrsrs, Beleza leon!