Quote:
Originally Posted by Samp-Wiki
Players will die if teleported while diving with a parachute.
Parachutes are given when bailing out of aircraft. (be aware of this for Anti-Cheats)
|
To solve that, just use this function, it remove the player's weapon. i've made a little example, but you could make some calc's to check if he's mid air, i'am too lazy to do.
pawn Код:
stock RemovePlayerWeapon(p,weaponid)
{
new l_arma[12],l_muni[12],l_arma2,l_muni2;
for(new Tslots = 0; Tslots != 12;Tslots++ )
{
GetPlayerWeaponData(p,Tslots,l_arma2,l_muni2);
if(l_arma2!= weaponid)GetPlayerWeaponData(p,Tslots,l_arma[Tslots],l_muni[Tslots]);
}
ResetPlayerWeapons(p);
for(new Tslots = 0;Tslots != 12;Tslots++)GivePlayerWeapon(p,l_arma[Tslots],l_muni[Tslots]);
return 1;
}
how to use that?
pawn Код:
CMD:setpos(playerid,params[])
{
new
Float:l_x,
Float:l_y,
Float:l_z,
id;
if(sscanf(params,"uiii",id,l_x,l_y,l_z))return SendClientMessage(playerid,-1,"/setpos [id] [X] [Y] [Z]");
if(GetPlayerWeapons(id) == 46) RemovePlayerWeapon(id,46);
SetPlayerPos(id,,l_x,l_y,l_z);
return 1;
}