19.03.2016, 15:58
Hellow Guys.
I try to do a command with a object. Hmmm, let me to explain. When i type a command to create a object at my pos.
I try to do that:
But the object aren't create.
I try to do a command with a object. Hmmm, let me to explain. When i type a command to create a object at my pos.
I try to do that:
But the object aren't create.
Код HTML:
CMD:plantbomb(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, -197.0806,2137.8376,-13.9528))
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_DS, "{999999}Animations are inaccessible on foot.");
ClearAnimations(playerid);
OnePlayAnim(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
bmb[playerid] = CreateObject(18257, 0.0,0.0,0.0, 0.0,0.0,0.0, 40.0);
SetObjectPos(bmb[playerid], x, y, z);
SetTimerEx("BombExplode", 10*1000, false, "i", playerid);
SCM(playerid, -1, "");
}
if(IsPlayerInRangeOfPoint(playerid, 10.0, -216.2014,2099.9409,-13.9028))
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_DS, "{999999}Animations are inaccessible on foot.");
ClearAnimations(playerid);
OnePlayAnim(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
bmb[playerid] = CreateObject(18257, x, y, z, x, y, z, 30);
SetTimerEx("BombExplode", 10*1000, false, "i", playerid);
SCM(playerid, -1, "");
}
if(IsPlayerInRangeOfPoint(playerid, 10.0, -254.7464,2094.7515,-13.9028))
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_DS, "{999999}Animations are inaccessible on foot.");
ClearAnimations(playerid);
OnePlayAnim(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
bmb[playerid] = CreateObject(18257, x, y, z, x, y, z, 30);
SetTimerEx("BombExplode", 10*1000, false, "i", playerid);
SCM(playerid, -1, "");
}
return 1;
}

