21.06.2013, 15:35
What is the problem of the command the command isn't bugged but shows Server: Unknown Command. only in the house commands like /buyhouse /sellhouse /setrentable /rentroom etc.
Please help people
Some Pictures:
Command:
Please help people
Some Pictures:
Command:
pawn Код:
if(strcmp(cmd, "/open", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]) || PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
if(PlayerInfo[playerid][pHousekey] == i)
{
if(HouseInfo[i][hLock] == 1)
{
HouseInfo[i][hLock] = 0;
GameTextForPlayer(playerid, "~w~Door ~g~Unlocked", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
OnPropUpdate();
DestroyDynamicPickup(HousePickup[i]);
DestroyDynamic3DTextLabel(HouseLabel[i]);
OnPropTextdrawUpdate(2, i);
return 1;
}
if(HouseInfo[i][hLock] == 0)
{
HouseInfo[i][hLock] = 1;
GameTextForPlayer(playerid, "~w~Door ~r~Locked", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
DestroyDynamicPickup(HousePickup[i]);
DestroyDynamic3DTextLabel(HouseLabel[i]);
OnPropTextdrawUpdate(2, i);
return 1;
}
}
else
{
GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);
return 1;
}
}
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]) || PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
{
if(PlayerInfo[playerid][pPbiskey] == i)
{
if(BizzInfo[i][bLocked] == 1)
{
BizzInfo[i][bLocked] = 0;
GameTextForPlayer(playerid, "~w~Bussiness ~g~Open", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
OnPropUpdate();
DestroyDynamicPickup(BusinessPickup[i]);
DestroyDynamic3DTextLabel(BusinessLabel[i]);
OnPropTextdrawUpdate(1, i);
return 1;
}
if(BizzInfo[i][bLocked] == 0)
{
BizzInfo[i][bLocked] = 1;
GameTextForPlayer(playerid, "~w~Bussiness ~r~Closed", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
OnPropUpdate();
DestroyDynamicPickup(BusinessPickup[i]);
DestroyDynamic3DTextLabel(BusinessLabel[i]);
OnPropTextdrawUpdate(1, i);
return 1;
}
}
else
{
GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);
return 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+100)
{
if(SBizzInfo[i][sbLocked] == 1)
{
SBizzInfo[i][sbLocked] = 0;
GameTextForPlayer(playerid, "~w~Bussiness ~g~Open", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
return 1;
}
if(SBizzInfo[i][sbLocked] == 0)
{
SBizzInfo[i][sbLocked] = 1;
GameTextForPlayer(playerid, "~w~Bussiness ~r~Closed", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
return 1;
}
}
else
{
GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);
return 1;
}
}
}
}
return 1;
}