How to make level 1 can not get kill for 2 hours playing
#1

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
Reply
#2

Show me your enum that holds the PLayerInfo or pInfo
Reply
#3

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())
Reply
#4

U will need this include >http://www.solidfiles.com/d/8d1f92e2ca/OPSP.inc Thanks to wups

The Code> http://pastebin.com/bxgCYzGj
Reply
#5

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;
}
Reply
#6

thanks all guys for helping
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)