also ich hab mal virtualworld eingebaut etwa so:
Code
if(strcmp(cmd, "/exit", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
//printf("House :%d",i);
i=LetztesHaus[playerid];
if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
SetPlayerVirtualWorld(playerid,1);
LetztesHaus[playerid]=0;
}
}
[...]
Alles anzeigen
Code
if(strcmp(cmd, "/enter", true) == 0)//enter
{
if(IsPlayerConnected(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)
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~w~Willkommen Zuhause", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
SetPlayerVirtualWorld(playerid, i);
LetztesHaus[playerid]=i;
}
else
{
GameTextForPlayer(playerid, "~r~Zugeschlossen", 5000, 1);
}
}
}
Alles anzeigen
aber sobald ich /exit mache kann man hinterher keine befehle nutzen