Problem SERVER Unknown Cmd
#1

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:
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;
    }
Reply
#2

OnPlayerCommandText

return 1;
Reply
#3

its return 1; :@
Reply
#4

try this one

pawn Код:
if(!strcmp(cmd, "/open", true))
    {
        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;
    }
Reply
#5

ISNT WORKING OMGG :@ WHAT IS THE PROBLEM, Add me on skype erorche please, i will give you the gamemode if you have time
Reply
#6

Wait did you have zcmd if have then use CMD: format its awesome first of all do on top of script

pawn Код:
#include <zcmd>

then use
pawn Код:
CMD:open(playerid, params[])
    {
        #pragma unused params
        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;
    }
try this if works then ok else add me shehrozassad ok skype
Reply
#7

i found the problem the problem is this...
pawn Код:
OnPropUpdate(); // for updating mysql
DestroyDynamicPickup(HousePickup[i]); //destroying the pickup
DestroyDynamic3DTextLabel(HouseLabel[i]); // destroying the old 3dtext
OnPropTextdrawUpdate(2, i);//updating new text ----> i think this is the problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)