mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Implement/match CPlayerPed::ApplyAnimation(...)
This commit is contained in:
parent
74e2a5f12a
commit
4c8333f443
@ -1092,6 +1092,32 @@ void CPlayerPed::SetMoney(int iAmount)
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
void CPlayerPed::ApplyAnimation( char *szAnimName, char *szAnimFile, float fT,
|
||||
int opt1, int opt2, int opt3, int opt4, int iUnk )
|
||||
{
|
||||
int iWaitAnimLoad=0;
|
||||
|
||||
if(!m_pPed) return;
|
||||
if(!GamePool_Ped_GetAt(m_dwGTAId)) return;
|
||||
|
||||
// Can't allow 'naughty' anims!
|
||||
if( !stricmp(szAnimFile,"SEX") )
|
||||
return;
|
||||
|
||||
if (!pGame->IsAnimationLoaded(szAnimFile)) {
|
||||
pGame->RequestAnimation(szAnimFile);
|
||||
while(!pGame->IsAnimationLoaded(szAnimFile)) {
|
||||
Sleep(1);
|
||||
iWaitAnimLoad++;
|
||||
if(iWaitAnimLoad == 15) return; // we can't wait forever
|
||||
}
|
||||
}
|
||||
|
||||
ScriptCommand(&apply_animation,m_dwGTAId,szAnimName,szAnimFile,fT,opt1,opt2,opt3,opt4,iUnk);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
float CPlayerPed::GetAimZ()
|
||||
{
|
||||
if(m_pPed) {
|
||||
|
@ -92,6 +92,9 @@ public:
|
||||
|
||||
void SetAnimationSet(PCHAR szAnim);
|
||||
void SetMoney(int iAmount);
|
||||
void ApplyAnimation(char *szAnimName, char *szAnimFile, float fT,
|
||||
int opt1, int opt2, int opt3, int opt4, int iUnk);
|
||||
|
||||
|
||||
CPlayerPed();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user