How to make level 1 can not get kill for 2 hours playing -
jesdynguyen - 13.05.2014
I have a server roleplay , i want the newbie level 1 they cant get kill for 2 hour when they start after 2 hours they will be killed normal like another player , how can i do that , give me pawn please
thanks to visit my topic
Re: How to make level 1 can not get kill for 2 hours playing -
Mriss - 13.05.2014
Show me your enum that holds the PLayerInfo or pInfo
Re: How to make level 1 can not get kill for 2 hours playing -
RajatPawar - 13.05.2014
Quote:
Originally Posted by jesdynguyen
give me pawn please
|
Here
OT: This is a scripting help section, not a request section. I think I've said this more than 2 times in the last hour itself.
Request code here -
https://sampforum.blast.hk/showthread.php?tid=447813
If you want to do it yourself - when a player registers, set a variable against the player to true, set a timer for 2 hours to turn that variable to false and under OnPlayer(Take/Give)Damage, just set the health back. If you want you can save the remaining time for the timer if the player quits using a saving system. (under OnPlayerDisconnect, subtract gettime())
Re: How to make level 1 can not get kill for 2 hours playing -
Mriss - 13.05.2014
U will need this include >
http://www.solidfiles.com/d/8d1f92e2ca/OPSP.inc Thanks to
wups
The Code>
http://pastebin.com/bxgCYzGj
Re: How to make level 1 can not get kill for 2 hours playing -
MasonSFW - 13.05.2014
Sample below:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[issuerid][pLevel] == 1) return SendClientMessage(issuerid, COLOR_RED, " Your message here ");
SetPlayerSpecialAction(issuerid, SPECIAL_ACTION_CUFFED);
SetTimerEx("Uncuffed", 3000, false, "i", issuerid); // You can change time as like you
}
return 1;
}
forward Uncuffed(playerid);
public Uncuffed(playerid)
{
SetPlayerSpecialAction(targetid,SPECIAL_ACTION_NON E);
return 1;
}
Re: How to make level 1 can not get kill for 2 hours playing -
jesdynguyen - 13.05.2014
thanks all guys for helping