pawn Код:
if(strcmp(cmd, "/entrar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(GetPlayerState(playerid) == 1) TeleportParaInteriores(playerid);
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
//printf("Found House :%d",i);
if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
{
new OldWorld = GetPlayerVirtualWorld(playerid);
new NewWorld;
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerVirtualWorld(playerid,HouseInfo[i][hWorld]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~w~Bem Vindo Em casa", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
TaNaCasa[playerid] = i;
NewWorld = GetPlayerVirtualWorld(playerid);
format(string, sizeof(string), "DEBUG: seu world foi mudado de: %d para: %d.", OldWorld,NewWorld);
SendClientMessage(playerid, COLOR_GREY, string);
}
else
{
GameTextForPlayer(playerid, "~r~Trancado", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
//printf("Found House :%d",i);
if(!Policiais(playerid) && i == 3)
{
SendClientMessage(playerid, COLOR_GREY, " Sao apenas policiais !");
return 1;
}
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoneyEx(playerid) >= BizzInfo[i][bEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(BizzInfo[i][bLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Fechado", 5000, 1);
return 1;
}
GivePlayerMoneyEx(playerid,-BizzInfo[i][bEntranceCost]);
format(string, sizeof(string), "~r~-$%d~n~~w~Digite /sair~n~para sair", BizzInfo[i][bEntranceCost]);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
OnPropUpdate();
GameTextForPlayer(playerid, string, 5000, 3);
}
SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
PlayerInfo[playerid][pLocal] = i+99;
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s pagar $%d para entrar na empresa %d", dood, BizzInfo[i][bEntranceCost], i);
printf("%s", string);
PayLog(string);
//PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Voce nao tem dinheiro", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
{
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoneyEx(playerid) >= SBizzInfo[i][sbEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(SBizzInfo[i][sbLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Fechado", 5000, 1);
return 1;
}
if(i == 10)
{
PaintballPlayers ++;
PlayerPaintballing[playerid] = 1;
new rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
TogglePlayerControllable(playerid, 0);
}
else if(i == 11)
{
PlayerKarting[playerid] = 1;
SendClientMessage(playerid, TEAM_GROVE_COLOR, "Vocк й o novo participate da corida de kart, va a linha de saida");
}
else
{
return 1;
}
GivePlayerMoneyEx(playerid,-SBizzInfo[i][sbEntranceCost]);
gSpentCash[playerid] = GetPlayerMoneyEx(playerid);
SBizzInfo[i][sbProducts]--;
SBizzInfo[i][sbTill] += SBizzInfo[i][sbEntranceCost];
ExtortionSBiz(i, SBizzInfo[i][sbEntranceCost]);
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s pagar $%d para entrar na empresa %d", dood, SBizzInfo[i][sbEntranceCost], i);
printf("%s", string);
PayLog(string);
OnPropUpdate();
}
}
else
{
GameTextForPlayer(playerid, "~r~Voce nao tem dinheiro", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(HQOrg); i++)
{
if (PlayerToPoint(1, playerid,HQOrg[i][hqInteriorex], HQOrg[i][hqInteriorey], HQOrg[i][hqInteriorez]))
{
if(HQOrg[i][hqLock] == 0)
{
SetPlayerInterior(playerid,HQOrg[i][hqInt]);
SetPlayerPos(playerid,HQOrg[i][hqInteriorx],HQOrg[i][hqInteriory],HQOrg[i][hqInteriorz]);
PlayerInfo[playerid][pInt] = HQOrg[i][hqInt];
PlayerInfo[playerid][pLocal] = i+900;
SetPlayerVirtualWorld(playerid,HQOrg[i][hqWorld]+900);
TaNaHQ[playerid] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Porta da Hq Fechada", 5000, 1);
}
}
}
if (PlayerToPoint(3.0, playerid,1073.0619,-344.5148,73.9922))
{
if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
{
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,1205.0947,-10.1685,1000.9219);
PlayerInfo[playerid][pInt] = 2;
PlayerInfo[playerid][pLocal] = 242;
}
}
else if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438))
{
GameTextForPlayer(playerid, "~w~Bem vindo ao 8ball Track", 5000, 1);
SetPlayerInterior(playerid,7);
SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
}
else if (PlayerToPoint(8.0, playerid,-2111.5686,-443.9720,38.7344))
{
GameTextForPlayer(playerid, "~w~Bem vindo ao Dirt Track", 5000, 1);
SetPlayerInterior(playerid,4);
SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
}
else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344))
{
GameTextForPlayer(playerid, "~w~Bem vindo ao Stunting Track", 5000, 1);
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
}
else if (PlayerToPoint(1.0, playerid,1086.5247,-1234.9617,15.8203))
{
if(PlayerInfo[playerid][pPbiskey] != 102 && SBizzInfo[2][sbLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Fechado", 5000, 1);
return 1;
}
if(PlayerInfo[playerid][pPbiskey] == 102)
{
KillTimer(TimerPortasBancoLS);
APortasBancoLS();
TimerPortasBancoLS = SetTimer("FPortasBancoLS", 7000, 0);
}
else
{
KillTimer(TimerPortasBancoLS);
APortasBancoLS();
TimerPortasBancoLS = SetTimer("FPortasBancoLS", 7000, 0);
GivePlayerMoneyEx(playerid,-SBizzInfo[2][sbEntranceCost]);
format(string, sizeof(string), "~r~-R$%d", SBizzInfo[2][sbEntranceCost]);
GameTextForPlayer(playerid, string, 5000, 1);
gSpentCash[playerid] = GetPlayerMoneyEx(playerid);
SBizzInfo[2][sbTill] += SBizzInfo[2][sbEntranceCost];
ExtortionSBiz(2, SBizzInfo[2][sbEntranceCost]);
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s pagar $%d para entrar na empresa %d", dood, SBizzInfo[2][sbEntranceCost], 2);
printf("%s", string);
PayLog(string);
OnPropUpdate();
}
}
}
return 1;
}
if(strcmp(cmd, "/sair", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
if(TaNaCasa[playerid] == i)
{
new OldWorld = GetPlayerVirtualWorld(playerid);
new NewWorld;
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid,0);
PlayerInfo[playerid][pLocal] = 255;
TaNaCasa[playerid] = 255;
if(HouseInfo[i][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if(tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
}
}
NewWorld = GetPlayerVirtualWorld(playerid);
format(string, sizeof(string), "DEBUG: seu world foi mudado de: %d para: %d.", OldWorld,NewWorld);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
}
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
//printf("Bizz :%d",i);
if (PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]);
PlayerInfo[playerid][pLocal] = 255;
}
}
if(GetPlayerVehicleID(playerid) >= 71 && GetPlayerVehicleID(playerid) <= 77)
{
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
}
else if (PlayerToPoint(6.0, playerid,-1404.5299,-259.0602,1043.6563))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,2695.6235,-1704.6960,11.8438);
}
else if (PlayerToPoint(8.0, playerid,-1443.0554,-581.1879,1055.0472))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2111.5686,-443.9720,38.7344);
}
else if (PlayerToPoint(8.0, playerid,-1464.7732,1557.5533,1052.5313))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2080.3079,-406.0309,38.7344);
}
else if (PlayerToPoint(1.0, playerid,1086.5479,-1237.4865,16.1183))
{
KillTimer(TimerPortasBancoLS);
APortasBancoLS();
TimerPortasBancoLS = SetTimer("FPortasBancoLS", 7000, 0);
}
else if(NoFuel[playerid] == 1)
{
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
NoFuel[playerid] = 0;
}
}
return 1;
}
bom meu GameMode e feito a partir do GF jб esta com 40 mil linhas mais eu nгo consigo arruma este bug, espero que alguйm me ajude ^^