class not available
#1

Hello,

I want a team where we can be only one in, so I want to set the availability for only one player. If this player die he is in the class menu and it becomes available again for only one player(but not for the player who died it become available for him in 10/15 minutes).
I don't know how do that it will be very great if you can explain me how to do that.
If you send a code explain me what does mean all the lines.

Thank you,
Reply
#2

I see you are trying to make something similar to PTP..

pawn Код:
new IsSpawned[MAX_PLAYERS];

onplayerspawn
//if it's the team where he can be only once in you put
IsSpawned[playerid] = 1;
SetTimerEx("joinagain",TIME,false,"d",playerid);

//then under:
onplayerrequestspawn
if(classid ??) && IsSpawned[playerid] == 1)
{
sendclientmessage(playerid,color,"you can only join this team each 15 minutes!");
return 0;


forward joinagain(playerid);
public joinagain(playerid)
{
IsSpawned[playerid] =0;
NOTE: This is just a example code...
Reply
#3

Thanks for reply

I tested your code but I don't know how to adapt this at my gamemode because I have errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)