 |
|
AlliedModders Donor
Join Date: Jan 2011
Location: France
|

05-05-2014
, 08:10
Re: why this plugin make me crash ?
|
#11
|
Quote:
Originally Posted by Miew
PHP Code:
#include <sourcemod> #include <sdktools>
new Float:f_PosClient[3];
new g_HaloIndex; new g_ModelIndex;
public Plugin:myinfo = { name = "Player_Jump_Effect", author = "Skuzy", description = " ", version = "1.0.0", url = " " };
public OnPluginStart() { HookEvent("player_jump", OnPlayerJump_CB);
g_HaloIndex = PrecacheModel("materials/sprites/halo01.vmt"); g_ModelIndex = PrecacheModel("sprites/laser.vmt");
}
public OnPlayerJump_CB(Handle:event, const String:name[], bool:dontBroadcast) { new userid = GetEventInt(event, "userid"); new client = GetClientOfUserId(userid); Beam(client); }
public Beam(client) { GetClientAbsOrigin(client, f_PosClient);
f_PosClient[2] += 5; new color[4]; color[0] = GetRandomInt(0, 255); color[1] = GetRandomInt(0, 255); color[2] = GetRandomInt(0, 255); color[3] = 255;
TE_SetupBeamRingPoint(f_PosClient, 40.0, 50.0, g_ModelIndex, g_HaloIndex, 0, 10, 0.6, 10.0, 0.5, color, 10, 1); TE_SendToAll(); }
|
Lowl
And, if client index is bad ? WHATS HAPPENING
__________________
|
|
|
|