mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
added FNullEntity check
This commit is contained in:
parent
a96d26d573
commit
8fbbda13c6
@ -239,6 +239,11 @@ static cell AMX_NATIVE_CALL give_item(AMX *amx, cell *params) // native give_ite
|
|||||||
// Create the entity, returns to pointer
|
// Create the entity, returns to pointer
|
||||||
pItemEntity = CREATE_NAMED_ENTITY(item);
|
pItemEntity = CREATE_NAMED_ENTITY(item);
|
||||||
|
|
||||||
|
if(FNullEnt(pItemEntity)) {
|
||||||
|
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
//VARS(pItemEntity)->origin = VARS(pPlayer)->origin; // nice to do VARS(ent)->origin instead of ent->v.origin? :-I
|
//VARS(pItemEntity)->origin = VARS(pPlayer)->origin; // nice to do VARS(ent)->origin instead of ent->v.origin? :-I
|
||||||
//I'm not sure, normally I use macros too =P
|
//I'm not sure, normally I use macros too =P
|
||||||
pItemEntity->v.origin = pPlayer->v.origin;
|
pItemEntity->v.origin = pPlayer->v.origin;
|
||||||
|
Loading…
Reference in New Issue
Block a user