if(strcmp(cmd,"/enter",true) == 0)
{
new hCount = 0;
for(new h; h <= MAX_HOUSES; h++)
{
if(PlayerToPoint(MaxPTP,playerid,HouseInfo[h][hX],HouseInfo[h][hY],HouseInfo[h][hZ]))
{
hCount += 1;
if(HouseInfo[h][hLocked] == 0 || !strcmp(pName,HouseInfo[h][hOwner],true) && IsPlayerLogged(playerid))
{
EnterHouse(playerid,h);
if(strcmp(HouseInfo[h][hOwner],pName,true) == 0) format(string,sizeof(string),"SERVER: Welcome home, %s.",pName);
else format(string,sizeof(string),"SERVER: Welcome in %s's house, %s.",HouseInfo[h][hOwner],pName);
SendClientMessage(playerid,COLOR_ROYALBLUE,string);
}
else SendClientMessage(playerid,COLOR_STEELBLUE,"SERVER: This house is locked!");
}
}
if(hCount == 0) SendClientMessage(playerid,COLOR_STEELBLUE,"SERVER: You aren't near any house!");
return 1;
}
if(strcmp(cmd,"/enter",true) == 0) { new hCount = 0; for(new h; h <= MAX_HOUSES; h++) { if(PlayerToPoint(MaxPTP,playerid,HouseInfo[h][hX],HouseInfo[h][hY],HouseInfo[h][hZ])) { hCount += 1; if(HouseInfo[h][hLocked] == 0 || !strcmp(pName,HouseInfo[h][hOwner],true) && IsPlayerLogged(playerid)) { EnterHouse(playerid,h); if(strcmp(HouseInfo[h][hOwner],pName,true) == 0) format(string,sizeof(string),"SERVER: Welcome home, %s.",pName); else format(string,sizeof(string),"SERVER: Welcome in %s's house, %s.",HouseInfo[h][hOwner],pName); SendClientMessage(playerid,COLOR_ROYALBLUE,string); } else SendClientMessage(playerid,COLOR_STEELBLUE,"SERVER: This house is locked!"); { if(hCount == 0) SendClientMessage(playerid,COLOR_STEELBLUE,"SERVER: You aren't near any house!"); } } return 1; }
if(strcmp(cmd,"/enter",true) == 0) { new hCount = 0; for(new h; h <= MAX_HOUSES; h++) { if(PlayerToPoint(MaxPTP,playerid,HouseInfo[h][hX],HouseInfo[h][hY],HouseInfo[h][hZ])) { hCount += 1; if(HouseInfo[h][hLocked] == 0 || !strcmp(pName,HouseInfo[h][hOwner],true) && IsPlayerLogged(playerid)) { EnterHouse(playerid,h); if(strcmp(HouseInfo[h][hOwner],pName,true) == 0) format(string,sizeof(string),"SERVER: Welcome home, %s.",pName); else format(string,sizeof(string),"SERVER: Welcome in %s's house, %s.",HouseInfo[h][hOwner],pName); SendClientMessage(playerid,COLOR_ROYALBLUE,string); } else SendClientMessage(playerid,COLOR_STEELBLUE,"SERVER: This house is locked!"); { if(hCount == 0) SendClientMessage(playerid,COLOR_STEELBLUE,"SERVER: You aren't near any house!"); } } } return 1; }
Originally Posted by _Xerxes_
Is OnPlayerCommandText returning 0?
|
Originally Posted by armyoftwo
Код:
if(strcmp(cmd,"/enter",true) == 0) { new hCount = 0; for(new h; h <= MAX_HOUSES; h++) { if(PlayerToPoint(MaxPTP,playerid,HouseInfo[h][hX],HouseInfo[h][hY],HouseInfo[h][hZ])) { hCount += 1; if(HouseInfo[h][hLocked] == 0 || !strcmp(pName,HouseInfo[h][hOwner],true) && IsPlayerLogged(playerid)) { EnterHouse(playerid,h); if(strcmp(HouseInfo[h][hOwner],pName,true) == 0) format(string,sizeof(string),"SERVER: Welcome home, %s.",pName); else format(string,sizeof(string),"SERVER: Welcome in %s's house, %s.",HouseInfo[h][hOwner],pName); SendClientMessage(playerid,COLOR_ROYALBLUE,string); } else SendClientMessage(playerid,COLOR_STEELBLUE,"SERVER: This house is locked!"); { if(hCount == 0) SendClientMessage(playerid,COLOR_STEELBLUE,"SERVER: You aren't near any house!"); } } } return 1; } |
Originally Posted by Hiddos
Quote:
Quote:
|
return 0;