22.05.2011, 14:42
(
Последний раз редактировалось SuperGame; 23.05.2011 в 16:39.
)
Pessoal o /sair nao esta funcionando podem me ajudar?
Код:
if(strcmp(cmd, "/entrar", true) == 0) { if(IsPlayerConnected(playerid)) { if(GetPlayerState(playerid) == 1) TeleportParaInteriores(playerid); for(new i = 0; i < sizeof(HouseInfo); i++) { //new world = GetPlayerVirtualWorld(playerid)-1; 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]); 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; SetPlayerVirtualWorld(playerid,HouseInfo[i][hWorld]); 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); } } }
Код:
if(strcmp(cmd, "/sair", true) == 0) { if(IsPlayerConnected(playerid)) { for(new i = 0; i < sizeof(HouseInfo); i++) { if(GetPlayerVirtualWorld(playerid) != 0 && TaNaHQ[playerid] == 255 && TaNaCasa[playerid] != 255) { new world = GetPlayerVirtualWorld(playerid)-1; if (PlayerToPoint(3, playerid,HouseInfo[world][hExitx], HouseInfo[world][hExity], HouseInfo[world][hExitz])) { //new OldWorld = GetPlayerVirtualWorld(playerid); //new NewWorld; SetPlayerInterior(playerid,0); SetPlayerPos(playerid,HouseInfo[world][hEntrancex],HouseInfo[world][hEntrancey],HouseInfo[world][hEntrancez]); PlayerInfo[playerid][pInt] = 0; PlayerInfo[playerid][pLocal] = 255; SetPlayerVirtualWorld(playerid,0); 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);*/ } } }