Pawno crash
#1

Like the title say. My pawno crash when I try to make this..
pawn Код:
public OnPlayerHeadshot(playerid,targetid,weaponid)
{
    new Float:health;
    new Float:slx, Float:sly, Float:slz;
    GetPlayerHealth(targetid,health);

    if(IsAHitman(playerid))
    {
        switch(weaponid)
        {
            case 22,23,24,25,26,27,28,29,30,31,32,33,34:
            {
                if(PlayerInfo[targetid][pAdminDuty] == 1)
                {
                    GetPlayerPos(playerid, slx, sly, slz);
                    SafeSetPlayerPos(playerid, slx, sly, slz+8);
                    PlayerPlaySound(playerid, /*1130*/1190, slx, sly, slz+8);
                    GameTextForPlayer(playerid, "~r~Dont shoot admin on duty!",5000,3);
                }
                else
                {
                    SetPlayerHealth(targetid,0);
                }
            }
        }
    }
    else
    {
        switch(weaponid)
        {
            case 34:
            {
                if(PlayerInfo[targetid][pAdminDuty] == 1)
                {
                    GetPlayerPos(playerid, slx, sly, slz);
                    SafeSetPlayerPos(playerid, slx, sly, slz+8);
                    PlayerPlaySound(playerid, /*1130*/1190, slx, sly, slz+8);
                    GameTextForPlayer(playerid, "~r~Dont shoot admin on duty!",5000,3);
                }
                else
                {
                    SetPlayerHealth(targetid,0);
                }
            }
        }
    }
    return 0;
}
I'm guessing that I placed bracket or something wrong but I got no idea how to place it
Reply


Messages In This Thread
Pawno crash - by Don_Cage - 07.09.2013, 01:04

Forum Jump:


Users browsing this thread: 2 Guest(s)