How let select class if time passed
#1

How can i let select class if time is passed, for example >210 I can select, <210 i cant select. So if time passed i want make that, you can select class, bat just with one condition you press on it and you get message "Class will be selected on next round", so if i DIE or NEXT MAP started then i get that class. I hope you understand what i mean.

P.S is let you select if time is not passed 210.
Код:
	case DIALOG_CLASS_2:
	{
    if(teams[playerid] == TEAM_RED)
    {
    if(response)
    {
    if(times >= 210)
    {
    switch(listitem)
    {
	case 0: if(pInfo[playerid][pXP] >= 0) pInfo[playerid][pRedClass] = 0,pInfo[playerid][pHumanClass] = CIVILIAN,setClass(playerid); else { SendXPError(playerid,0); }
	case 1: if(pInfo[playerid][pXP] >= 1000) pInfo[playerid][pRedClass] = 0,pInfo[playerid][pHumanClass] = POLICEMAN,setClass(playerid); else { SendXPError(playerid,1000); }
	case 2: if(pInfo[playerid][pXP] >= 2000) pInfo[playerid][pRedClass] = 0,pInfo[playerid][pHumanClass] = MEDIC,setClass(playerid); else { SendXPError(playerid,2000); }
This is setClass stock

Код:
stock setClass(playerid)
{
	if(teams[playerid] == TEAM_RED)
	{
	    ResetPlayerWeapons(playerid);
		switch(pInfo[playerid][pRedClass])
		{
		    case CIVILIAN:
		    {
		        GivePlayerWeapon(playerid,23,50);
		        GivePlayerWeapon(playerid,25,70);
		        SetPlayerArmour(playerid,0);
		        switch(random(6))
		        {
		            case 0: SetPlayerSkin(playerid,5);
		            case 1: SetPlayerSkin(playerid,23);
		            case 2: SetPlayerSkin(playerid,56);
		            case 3: SetPlayerSkin(playerid,289);
		            case 4: SetPlayerSkin(playerid,299);
				}
			}

			case POLICEMAN:
			{
			    GivePlayerWeapon(playerid,24,72);
		        GivePlayerWeapon(playerid,25,80);
		        SetPlayerArmour(playerid,0);
		        SetPlayerSkin(playerid,281);
			}

			case MEDIC:
			{
   				GivePlayerWeapon(playerid,23,100);
		        GivePlayerWeapon(playerid,25,110);
		        SetPlayerArmour(playerid,10);
		        SetPlayerSkin(playerid,275);
			}
		}
	}
setClass i use in "OnPlayerSpawn"
Reply
#2

Bump
Reply
#3

bump
Reply
#4

There is
Quote:

if(times >= 210)

in the first one change 210 to your desired time. Is that what you want?
Reply
#5

Quote:
Originally Posted by coool
Посмотреть сообщение
There is

in the first one change 210 to your desired time. Is that what you want?
Read, dude.
Reply
#6

Quote:
Originally Posted by coool
Посмотреть сообщение
There is

in the first one change 210 to your desired time. Is that what you want?
No. I want make if time passed 210sec class will set only if i die or next round started.
Reply
#7

Bump
Reply
#8

Any ideas?
Reply
#9

Bump
Reply
#10

Create a timer?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)