Help, please.
#1

Hey, guys
I want to ask for you about one thing. Well, for example player shoot other player and in the shot player's screen show the shooter for few seconds. Something like in shooting games. Is it possible? I hope you understand me. Thanks for all help.
Reply
#2

If I understood you correctly, then yeah, it is possible.
Reply
#3

Well, is it hard to do that?
Reply
#4

With this include it's not hard at all!
Reply
#5

Nice, thanks! Oh, and maybe you can give me some example, how can i do this?
Reply
#6

Sure, here you go!
pawn Code:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    new string[128], ShooterName[24];
    GetPlayerName(Shooter,ShooterName,24);
    format(string,sizeof(string),"~r~~h~%s~g~~h~has just shot you!",ShooterName);
    GameTextForPlayer(playerid,string,4000,4);
    return 1;
}
Reply
#7

Thanks! But how can i do that the shooter shows in shot player screen? Are you playing counter strike?
Reply
#8

Here you go
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
    PlayerSpectatePlayer(playerid,killerid);
    if(IsPlayerInAnyVehicle(killerid))
    {
        PlayerSpectateVehicle(playerid,GetPlayerVehicleID(killerid));
    }
else
{
    TogglePlayerSpectating(playerid,1);
}
  SetTimerEx("StopSpectating",5000,false,"i",Target);
    return 1;
}

forward StopSpectating(playerid);
public StopSpectating(playerid)
{
    TogglePlayerSpectating(playerid,0);
    SpawnPlayer(playerid);
}
Reply
#9

Thanks, man! You really helped me!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)