Hello, Im trying to find No Mercy's escape helicopter to replace it by a flying car,
but I don't know it's entity model nor classname.
I have tried something like this:
PHP Code:
public OnMapStart()
{
PrecacheModel("models/prop_vehicles/car_white.mdl", true);
}
public OnEntityCreated(entity, const String:classname[])
{
PrintToChatAll( "*********found: %s", classname );
SDKHook(entity, SDKHook_Spawn, test);
}
public Action:test(entity, classname)
{
decl String:modelname[255];
if (entity != -1)
{
GetEntPropString(entity, Prop_Data, "m_ModelName", modelname, sizeof(modelname));
PrintToChatAll("modelname: %s", modelname);
if ( StrContains(modelname, "heli")>=0 )
{
DispatchKeyValue(entity, "m_ModelName", "models/prop_vehicles/car_white.mdl");
DispatchSpawn(entity);
PrintToChatAll("***********HELICOPTERO CAMBIADO");
return Plugin_Changed;
}
GetEntPropString(entity, Prop_Data, "model", modelname, sizeof(modelname));
if ( StrContains(modelname, "heli")>=0 )
{
DispatchKeyValue(entity, "model", "models/prop_vehicles/car_white.mdl");
DispatchSpawn(entity);
PrintToChatAll("***********HELICOPTERO CAMBIADO");
return Plugin_Changed;
}
}
return Plugin_Continue;
}
But I cannot found that helicopter!.
I have joined a Brazilian server that replaces that helicopter by a flying car buy they have not posted their plugin, so I want to remake it.
Any help please?