03.12.2014, 15:46
I have read
https://sampforum.blast.hk/showthread.php?tid=520669
and
https://sampforum.blast.hk/showthread.php?tid=528846
I want two operations together fs
Should I add add like this?
I tested it only works one thing
This my code
Help me
https://sampforum.blast.hk/showthread.php?tid=520669
and
https://sampforum.blast.hk/showthread.php?tid=528846
I want two operations together fs
Should I add add like this?
I tested it only works one thing

This my code

Код:
#include <a_samp> #include <zcmd> #include <streamer> #define MAX_HOLES 200 #pragma tabsize 0 enum hInfo { hCreated, Float:hX, Float:hY, Float:hZ, hCount, hObject, }; new HoleInfo[MAX_HOLES][hInfo]; public OnFilterScriptInit() { for(new i; i < MAX_HOLES; i++) { i = 0; return 1;} print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); return 1; } stock CreateHole(Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:Angle) { for(new i = 0; i < sizeof(HoleInfo); i++) { if(HoleInfo[i][hCreated] == 0) { HoleInfo[i][hCreated]=1; HoleInfo[i][hX]=x; HoleInfo[i][hY]=y; HoleInfo[i][hZ]=z; HoleInfo[i][hObject] = CreateObject(3106, x, y, z, rx, ry, Angle); HoleInfo[i][hCount] += 1; SetObjectMaterial(HoleInfo[i][hObject], 0, 19341, "egg_texts", "easter_egg01", 0xFF000000); return 1; } if(HoleInfo[i][hCount] == MAX_HOLES) { return DeleteAllHoles(); } } return 0; } CMD:clearb(playerid, params[]) { DeleteAllHoles(); return 1; } stock DeleteAllHoles() { for(new i = 0; i < sizeof(HoleInfo); i++) { if(HoleInfo[i][hCreated] == 1) { HoleInfo[i][hCreated]=0; HoleInfo[i][hX]=0.0; HoleInfo[i][hY]=0.0; HoleInfo[i][hZ]=0.0; HoleInfo[i][hCount] = 0; DestroyObject(HoleInfo[i][hObject]); } } return 0; } public OnFilterScriptExit() { return 1; } GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance) { new Float:a; GetPlayerPos(playerid, x, y, a); GetPlayerFacingAngle(playerid, a); if (GetPlayerVehicleID(playerid)) { GetVehicleZAngle(GetPlayerVehicleID(playerid), a); } x += (distance * floatsin(-a, degrees)); y += (distance * floatcos(-a, degrees)); } public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) new bulletobject; if(weaponid == 38 || weaponid == 37 || weaponid == 36 || weaponid == 35) return 1; else{ if(hittype == 0 && fX != 0) { new Float: A, Float: rX, Float: rY; GetXYInFrontOfPlayer(playerid, rX, rY, 5.0); GetPlayerFacingAngle(playerid, A); CreateHole(fX, fY, fZ, rX, rY, A-90); } } if(hittype == 2) { bulletobject = CreateObject(3106, fX, fY, fZ, 0.0, 0.0, 0.0); AttachObjectToVehicle(bulletobject, hitid, fX,fY, fZ, 0.0, 0.0, 0.0); SetTimerEx("DestroyBullet", 200, false, "i", bulletobject); } return 1; } forward DestroyBullet(bulletid); public DestroyBullet(bulletid) { DestroyObject(bulletid); }