Saving bullet positions?
#7

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
"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.
Uhm Excuse me? He's asking for help so don't be fucking rude, How about if he joined SA-MP forums for fun in 2010 and no intention of learning PAWN, and he started to learn PAWN at 2012 or late 2013, if you think he always ask question then don't reply and shut up instead.

@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;
}
Reply


Messages In This Thread
Saving bullet positions? - by Dokins - 04.04.2014, 06:36
Re: Saving bullet positions? - by SickAttack - 04.04.2014, 06:44
Re: Saving bullet positions? - by Dokins - 04.04.2014, 06:58
Re: Saving bullet positions? - by SickAttack - 04.04.2014, 07:07
Re: Saving bullet positions? - by LocMax - 04.04.2014, 07:12
Re: Saving bullet positions? - by Dokins - 04.04.2014, 07:16
Re: Saving bullet positions? - by Patrick - 04.04.2014, 07:17
Re: Saving bullet positions? - by Dokins - 04.04.2014, 07:20
Re: Saving bullet positions? - by Patrick - 04.04.2014, 07:22
Re: Saving bullet positions? - by LocMax - 04.04.2014, 07:22

Forum Jump:


Users browsing this thread: 1 Guest(s)