Littkw help with deagle - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Littkw help with deagle (
/showthread.php?tid=294296)
Littkw help with deagle -
boyan96 - 01.11.2011
How i can disaple when player go inside in vehicle to remove deagle but when he go out ti have again deagle
Re: Littkw help with deagle -
[HiC]TheKiller - 01.11.2011
https://sampwiki.blast.hk/wiki/SetPlayerArmedWeapon
Just set it to a fist / uzi.
Re: Littkw help with deagle -
boyan96 - 01.11.2011
PHP код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
new Weap[2];
GetPlayerWeaponData(playerid, 4, Weap[0], Weap[1]); // Get the players SMG weapon in slot 4
SetPlayerArmedWeapon(playerid, Weap[0]); // Set the player to driveby with SMG
}
return 1;
}
how i can make it with this
Re: Littkw help with deagle -
boyan96 - 01.11.2011
ideas
Re: Littkw help with deagle -
Mean - 01.11.2011
Change to fist:
pawn Код:
public OnPlayerStateChange( playerid, newstate, oldstate ) {
if( newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER )
SetPlayerArmedWeapon( playerid, 0 );
return 1;
}
Change to SMG/UZI/TEC9:
pawn Код:
public OnPlayerStateChange( playerid, newstate, oldstate ) {
if( newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER ) {
new
weap
,ammo
;
GetPlayerWeaponData( playerid, 4, weap, ammo );
#pragma unused ammo
SetPlayerArmedWeapon( playerid, weap );
}
return 1;
}