Jump to content
  • 0

pomoc [Help] Tréning


RikoS

Dotaz

Čaute, mám menší problém.

Ked prídem na tu súradnicu a dám ENTER tak začnem cvičiť a hned prestanem..Vie niekto kde by mohla byť chyba? Ako to mám upraviť aby som cvičil..timer by sa spustil na minutu a potom by sa náhodne vybralo či som dostal Bod Sily alebo nie..

 

A mám to takto:

 

 

if(newkeys & KEY_SECONDARY_ATTACK)
{
if(IsPlayerConnected(playerid))
{
if(Player[playerid][Team]!=0) return SendClientMessage(playerid,C_WARNING,"[!]{ffffff} Niesi väzeň !");
else if(Player[playerid][DoingAnything]==1 && Player[playerid][strenghtTraining]==1)
{
KillTimer(Player[playerid][strenghtTimer]);
Player[playerid][DoingAnything]=0;
Player[playerid][strenghtTraining]=0;
PlayerCameraBack(playerid);
return SendClientMessage(playerid,C_WHITE,"[!]{ffffff} Prestal si trénovať silu !");
}
else if(Player[playerid][DoingAnything]==1) return SendClientMessage(playerid,C_WARNING,"[!]{ffffff} Nemôžeš trénovať silu, keď niečo robíš!");
else if(Player[playerid][strenght]>=100) return SendClientMessage(playerid,C_WARNING,"[!]{ffffff} Nemôžeš cvičiť, pretože si už dosiahol maximálny LVL sily!");
else if(IsPlayerInSphere(playerid,192.1564,1957.0048,17.6406,3)==1)
{
SendClientMessage(playerid,C_YELLOW,"Z[!]{ffffff} Začal si trenovať silu, počkaj 1 minútu do skončenia! ( tréning prerušíš príkazom /sila )");
TogglePlayerControllable(playerid,0);
ApplyAnimation(playerid,"ped","FightA_1",4.0,1,0,0,0,0);
Player[playerid][DoingAnything]=1;
Player[playerid][strenghtTraining]=1;
Player[playerid][strenghtTimer] = SetTimerEx("StrenghtEnd",60000,0,"i",playerid);
}
}
}

Link to comment
Share on other sites

0 odpovědí na tuto otázku

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...