mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-04 00:23:22 +08:00
[saco] Implement and match CPlayerPed::SetInitialState()
This commit is contained in:
parent
4a743549b5
commit
d767d9d6e3
@ -60,6 +60,38 @@ void CPlayerPed::ResetPointers()
|
||||
m_pEntity = (ENTITY_TYPE *)m_pPed;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
void CPlayerPed::SetInitialState()
|
||||
{
|
||||
DWORD dwPedPtr = (DWORD)m_pPed;
|
||||
//int iPlayerNumber = 0;
|
||||
//DWORD dwPlayerActorID = 0;
|
||||
|
||||
_asm push 0
|
||||
_asm mov ecx, dwPedPtr
|
||||
_asm mov edx, 0x60CD20 ; internal_CPlayerPed_SetInitialState
|
||||
_asm call edx
|
||||
|
||||
/* DESTROY METHOD
|
||||
_asm mov ecx, dwPedPtr
|
||||
_asm mov ebx, [ecx] ; vtable
|
||||
_asm push 1
|
||||
_asm call [ebx] ; destroy
|
||||
*/
|
||||
|
||||
// CREATE PLAYER
|
||||
/*
|
||||
ScriptCommand(&create_player, &iPlayerNumber, x, y, z, &dwPlayerActorID);
|
||||
ScriptCommand(&create_actor_from_player,&iPlayerNumber,&dwPlayerActorID);
|
||||
|
||||
m_dwGTAId = dwPlayerActorID;
|
||||
m_pPed = GamePool_Ped_GetAt(m_dwGTAId);
|
||||
m_bytePlayerNumber = 0;
|
||||
m_pEntity = (ENTITY_TYPE *)GamePool_Ped_GetAt(m_dwGTAId);
|
||||
*/
|
||||
}
|
||||
|
||||
void CPlayerPed::GiveWeapon(int iWeaponID, int iAmmo)
|
||||
{
|
||||
if(!m_pPed) return;
|
||||
|
@ -17,6 +17,7 @@ class CPlayerPed : public CEntity
|
||||
public:
|
||||
|
||||
void ResetPointers();
|
||||
void SetInitialState();
|
||||
|
||||
WORD GetAmmo();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user