AAlcohol Help
#1

so this is my script
SetTimer("alkoholcheck",1000,1);
SetTimer("triezvenie",30000,1);

forward alkoholcheck(playerid);
public alkoholcheck(playerid)
{
if(IsPlayerConnected(i))
{
if(Informacie[playerid][Alk]> 1)
{
if(Informacie[playerid][Alk]>= 2 && Informacie[playerid][Alk] < 4 ){
ApplyAnimation(playerid,"PED","WALK_DRUNK",0.05,1, 1,1,1,1);
}
else if(Informacie[playerid][Alk]>= 4 && Informacie[playerid][Alk] < 6 ){
ApplyAnimation(i,"PED","WALK_DRUNK",0.1,1,1,1,1,1) ;
}
else if(Informacie[playerid][Alk]>= 6 && Informacie[playerid][Alk] < 8 ){
SetPlayerDrunkLevel (playerid, 3000);
ApplyAnimation(playerid,"PED","WALK_DRUNK",0.15,1, 1,1,1,1);
}
else if(Informacie[playerid][Alk]>= 8 && Informacie[playerid][Alk] < 10 ){
SetPlayerDrunkLevel (playerid, 7000);
ApplyAnimation(playerid,"PED","WALK_DRUNK",0.2,1,1 ,1,1,1);
}
else if(Informacie[playerid][Alk]>= 10 && Informacie[playerid][Alk] < 12 ){
SetPlayerDrunkLevel (playerid, 20000);
ApplyAnimation(playerid,"PED","WALK_DRUNK",0.25,1, 1,1,1,1);
}
else if(Informacie[playerid][Alk]>= 12 && Informacie[playerid][Alk] < 14 ){
SetPlayerDrunkLevel (playerid, 15000);
ApplyAnimation(playerid,"PED","WALK_DRUNK",0.4,1,1 ,1,1,1);
}
else if(Informacie[playerid][Alk]>= 14 && Informacie[playerid][Alk] < 16 ){
SetPlayerDrunkLevel (playerid, 30000);
ApplyAnimation(playerid,"PED","WALK_DRUNK",0.5,1,1 ,1,1,1);
}
else if(Informacie[playerid][Alk]>= 16 && Informacie[playerid][Alk] < 18 ){
SetPlayerDrunkLevel (playerid, 40000);
ApplyAnimation(playerid,"PED","WALK_DRUNK",0.7,1,1 ,1,1,1);
ApplyAnimation(playerid,"PED","WALK_DRUNK",0.7,1,1 ,1,1,1);
}
else if(Informacie[playerid][Alk]>= 18 && Informacie[playerid][Alk] < 20 ){

SetPlayerDrunkLevel (i, 50000);
ApplyAnimation(playerid,"PED","WALK_DRUNK",0.9,1,1 ,1,1,1);
ApplyAnimation(playerid,"PED","WALK_DRUNK",0.9,1,1 ,1,1,1);
}
}
}
}
forward triezvenie(playerid);

public triezvenie(playerid)
{

if(IsPlayerConnected(i)) {
if (Informacie[playerid][Alk] != 0)
Informacie[playerid][Alk]--;
}
else if(hrac[playerid][alkohol] == 0) ClearAnimations(playerid);

}
}


som my problem is i canґt stop the animation ...when i have a 0 per mille....why pls help me or writte vy who must see public triezvenie

pls help me
Reply
#2

is someone hwo help me ?,

soorrry for my bad english
Reply
#3

Put the code in [ code]put your code here[/ code].
Or else we cant even read it normally.

[Doppeyy
Reply
#4

help pls
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)