SA-MP Forums Archive
Breake into pd - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Breake into pd (/showthread.php?tid=313537)



Breake into pd - Negat1Ve - 26.01.2012

Hello! i wanna know how to make command that what, when u type it at police dept doors, you can broke into pd. I have this crappy command but it doesn't work, it shows SERVER: Unknow command...
Help me please

My command:
pawn Код:
if(strcmp(cmd, "/brokepd", true) == 0)
{
    if (PlayerInfo[playerid][pLomiks] != 1)
    {
        SendClientMessage(playerid,COLOR_GRAD3,"You don't have a hammer!");
        return 1;
    }
    if (PlayerToPoint(2, playerid,240.1396,117.7666,1003.2257))
    {
        new randombroke;
        randombroke = random(2);
        switch(randombroke)
        {
            case 0:
            {
                GetPlayerName(playerid, sendername, sizeof(sendername));
                GiveNameSpace(sendername);
                format(string, sizeof(string), "* %s try to break doors with hammer, but fails.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
            case 1:
            {
                SetDynamicObjectRot(lspddoor1,0.00000000,0.00000000,310.00000000);
                SendClientMessage(playerid, COLOR_BLUE,"LSPD doors are broked!");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                GiveNameSpace(sendername);
                format(string, sizeof(string), "* %s break doors with his hammer.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
    }
    return 1;
}



Re: Breake into pd - Negat1Ve - 26.01.2012

please, help with this!