SA-MP Forums Archive
plz help me! - 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: plz help me! (/showthread.php?tid=565020)



plz help me! - ddanniel - 24.02.2015

when I shoot so it will come up text every time I shoot from the window of the car, can I remove it? yes or have deleted text, but it then becomes a space only in main chat, it's pretty over someone help me?



public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
new szString[144];
format(szString, sizeof(szString), "message", weaponid, hittype, hitid, fX, fY, fZ);
SendClientMessage(playerid, -1, szString);

return 1;
}


Re: plz help me! - -=Dar[K]Lord=- - 24.02.2015

Check for the players state on shooting... If the player is a passenger then donot pass this message.
Try this code..

Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(GetPlayerState(playerid) != PLAYER_STATE_PASSENGER)
{
new szString[144];
format(szString, sizeof(szString), "message", weaponid, hittype, hitid, fX, fY, fZ);
SendClientMessage(playerid, -1, szString);
}

return 1;
}



Re: plz help me! - ddanniel - 25.02.2015

thanks it worked

Now I just need so you can change weapons inside the car, is that true?


Re: plz help me! - -=Dar[K]Lord=- - 25.02.2015

https://sampwiki.blast.hk/wiki/SetPlayerArmedWeapon

You should get the data of the player about what weapon he has and then set the armed weapon as per as you want....


Re: plz help me! - ddanniel - 25.02.2015

done