18.03.2017, 21:00
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.
This is setClass stock
setClass i use in "OnPlayerSpawn"
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); }
Код:
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); } } }