04.04.2014, 07:17
Quote:
"That may be the most ridiculous statement I've ever heard" - http://forum.sa-mp.com/search.php?searchid=7985244 tells you everything. "Scripting 9 months" You been here more time than i have and you call yourself an "amateur scripter"? Really? Use your head boy.
|
@Dokins - Here's an example, hope you will learn something from it, this will store the weapon used, hittype, hitid and all the offsets where the bullet went.
pawn Код:
enum WeaponData {
e_weapon,
e_hittype,
e_hitid,
Float:bOffSet[ 3 ]
}
new wData[ MAX_PLAYERS ][ WeaponData];
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
new string[144];
weaponid = wData[ playerid ][ e_weapon ];
hittype = wData[ playerid ][ e_hittype ];
hitid = wData[ playerid ][ e_hitid ];
fX = wData[ playerid ][ bOffSet ][ 0 ];
fY = wData[ playerid ][ bOffSet ][ 1 ];
fZ = wData[ playerid ][ bOffSet ][ 2 ];
format(string, sizeof(string), "[DEBUG - Original] Weapon %i fired. hittype: %i hitid: %i pos: %f, %f, %f", weaponid, hittype, hitid, fX, fY, fZ);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "[DEBUG - Stored] Weapon %i fired. hittype: %i hitid: %i pos: %f, %f, %f", wData[ playerid ][ e_weapon ],
wData[ playerid ][ e_hittype ], wData[ playerid ][ e_hitid ], wData[ playerid ][ bOffSet ][ 0 ], wData[ playerid ][ bOffSet ][ 1 ], wData[ playerid ][ bOffSet ][ 2 ]);
SendClientMessage(playerid, -1, string);
return 1;
}