shooting problem
#1

pawn Code:
forward OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost);
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    new issuerid ;
    new targetid ;
    if(issuerid != INVALID_PLAYER_ID && targetid != INVALID_PLAYER_ID)
    {
        if(GetPlayerTeam(targetid) == GetPlayerTeam(issuerid))
        {
            new Float:AttackerHP;
            GetPlayerHealth(issuerid, AttackerHP);
            SetPlayerHealth(issuerid, AttackerHP-5.0);
            GameTextForPlayer(issuerid, "~r~Thats your team mate, stop shooting ", 5000, 5);
        }
    }
    new srtin[128];
    if(gTeam[issuerid] != TEAM_POLICE)
    {
        if(GetPlayerTeam(targetid) == TEAM_POLICE)
        {
            IncreaseWantedLevel(issuerid,2);
            format(srtin,sizeof(srtin),"[POLICE RADIO] Suspect %s is wanted for shooting/murdering officer %s and is Harmed and Dangerours proceed with caution.",issuerid,targetid);
            SendClientMessageToAllCops(srtin);
        }
    }
    new rstring2 [128],rstring [128];
    if(gTeam[issuerid] == TEAM_POLICE)
    {
        if(GetPlayerWantedLevel(targetid) == 0)
        {
            format(rstring,sizeof(rstring),"%s is not a wanted player.",targetid);
            SendClientMessage(issuerid,red,rstring);
            format(rstring2,sizeof(rstring2),"Officer %s is shooting a player thats not wanted",issuerid);
            SendClientMessageToAllAdmins(rstring2);
        }
    }
    return 1;
}
can someone tell me why doesnt this command work it only crash the game and i have the #include <OPSP>. And i get no errors so what could be the problem
Reply


Messages In This Thread
shooting problem - by 1fret - 22.12.2014, 01:12
Re: shooting problem - by Threshold - 22.12.2014, 09:06

Forum Jump:


Users browsing this thread: 1 Guest(s)