if(SleepLevel[playerid] != 0) { TogglePlayerControllable(playerid, 0); TextDrawShowForPlayer(playerid, SleepScreanTD); ApplyAnimation(playerid,"CRACK","crckdeth2",4.0, 1, 0, 0, 180000, 0); SetPlayerCameraPos(playerid, 2231.8608,-1161.0271,1031.3776); SetPlayerCameraLookAt(playerid,2228.0371,-1161.6714,1029.1803); GameTextForPlayer(playerid, "~w~Sleeping....", 5000, 1); Sleeping[playerid] = 1; SetTimerEx("Sleep2", 12000, false, "i", playerid); } |
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.1, 1, 0, 0, 0, 0, 1);
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/sleep", cmdtext, true, 10) == 0) { if(SleepLevel[playerid] != 0) { TogglePlayerControllable(playerid, 0); TextDrawShowForPlayer(playerid, SleepScreanTD); TogglePlayerControllable(playerid, 0); ApplyAnimation(playerid,"CRACK","crckdeth2",4.0, 1, 0, 0, 0, 0); GameTextForPlayer(playerid, "~w~Sleeping z Z z Z z Z", 5000, 180000); Sleeping[playerid] = 1; SetTimerEx("Sleep2", 10000, false, "i", playerid); } else { SendClientMessage(playerid, 0xFFFFFF, "{FF0000}[{FFFFFF}SleepSystem{FF0000}]{808080} You have no desire to sleep!"); return 1; } return 1; } return 0; |
} public Sleep2(playerid) { TextDrawHideForPlayer(playerid, SleepScreanTD); SleepLevel[playerid] = 0; SetProgressBarValue(SleepBar[playerid], SleepLevel[playerid]); UpdateProgressBar(SleepBar[playerid], playerid); TogglePlayerControllable(playerid, 1); Sleeping[playerid] = 0; SendClientMessage(playerid, 0xFFFFFF, "{00FF00}[{FFFFFF}SleepSystem{00FF00}]{808080} You just woke up, Is like you are born again!"); return 1; } |
PreloadAnimLib(playerid, animlib[]) ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
public OnPlayerRequestClass(playerid, classid)
{
PreloadAnimLib(playerid,"BOMBER"); PreloadAnimLib(playerid,"RAPPING"); PreloadAnimLib(playerid,"SHOP");
PreloadAnimLib(playerid,"BEACH"); PreloadAnimLib(playerid,"SMOKING"); PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"ON_LOOKERS"); PreloadAnimLib(playerid,"DEALER"); PreloadAnimLib(playerid,"CRACK");
PreloadAnimLib(playerid,"CARRY"); PreloadAnimLib(playerid,"COP_AMBIENT"); PreloadAnimLib(playerid,"PARK");
PreloadAnimLib(playerid,"INT_HOUSE"); PreloadAnimLib(playerid,"PED"); PreloadAnimLib(playerid,"MISC");
PreloadAnimLib(playerid,"OTB"); PreloadAnimLib(playerid,"BD_Fire"); PreloadAnimLib(playerid,"BENCHPRESS");
PreloadAnimLib(playerid,"KISSING"); PreloadAnimLib(playerid,"BSKTBALL"); PreloadAnimLib(playerid,"MEDIC");
PreloadAnimLib(playerid,"SWORD"); PreloadAnimLib(playerid,"POLICE"); PreloadAnimLib(playerid,"SUNBATHE");
PreloadAnimLib(playerid,"FAT"); PreloadAnimLib(playerid,"WUZI"); PreloadAnimLib(playerid,"SWEET");
PreloadAnimLib(playerid,"ROB_BANK"); PreloadAnimLib(playerid,"GANGS"); PreloadAnimLib(playerid,"RIOT");
PreloadAnimLib(playerid,"GYMNASIUM"); PreloadAnimLib(playerid,"CAR"); PreloadAnimLib(playerid,"CAR_CHAT");
PreloadAnimLib(playerid,"GRAVEYARD"); PreloadAnimLib(playerid,"POOL");
return 1;
}