SA-MP Forums Archive
protect newb and lost checkpoint - 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: protect newb and lost checkpoint (/showthread.php?tid=545617)



protect newb and lost checkpoint - hoangtn219 - 09.11.2014

Helo everybody. I'm have a server.I want to protect new players. If the player does not die mode, will abuse to kill other people, so no way to both protect players without allowing them to kill other people (can freeze them about 10 seconds when they attack others). And one more problem. Truck driver beside me there is a small problem, when they alight they lose points highlighting (check ponit). Can you help me this problem is not . Please


Re: protect newb and lost checkpoint - UltraScripter - 09.11.2014

you want it in rangeofpoint?


Re: protect newb and lost checkpoint - UltraScripter - 09.11.2014

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 10.0, 0.0, 0.0, 0.0)) // check if is in radius of place
    {
        TogglePlayerControllable(playerid, 0); //freeze's the player
        SetTimerEx("UnFreeze", 10000, false, "i", playerid); //Sets The Time To 10 Sec
    }
    return 1;
}

forward UnFreeze(playerid); //Creating Public

public UnFreeze(playerid)
{
    TogglePlayerControllable(playerid, 1); //10 Sec's Passed Time To UnFreeze Player/Player's!!! !!! !!!
    return 1;
}



Re: protect newb and lost checkpoint - hoangtn219 - 09.11.2014

freeze player take a dame ?


Re: protect newb and lost checkpoint - hoangtn219 - 09.11.2014

1.Players can not attack new players
2.New players can not attack others


Re: protect newb and lost checkpoint - UltraScripter - 09.11.2014

set them like a team


Re: protect newb and lost checkpoint - Dziugsas - 09.11.2014

What about this

pawn Код:
new bool:NewPlayer[MAX_PLAYERS];
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
    if(NewPlayer[damagedid] == true);
    {
        SetPlayerHealth(damagedid, 100);
        SendClientMessage(playerid, -1, "No abuse to new players!!!!!!!");
    }
    return 1;
}