10.05.2013, 06:05
What the... This is a tutorial on WHAT to do once the driveby is done with. To actually avoid drive - bys,
Or obviously just setting the weapon to 0.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_DRIVER)
{
new weapons[13][2];
for (new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
}
ResetPlayerWeapons(playerid);
if(newstate == PLAYER_STATE_ONFOOT && (oldstate == PLAYER_STATE_PASSENGER || oldstate == PLAYER_STATE_DRIVER) )
{
for( new i; i < 13; i++)
{
GivePlayerWeapon(playerid, weapons[i][0], weapons[i][1]);
}
}
return 1;
}

