How to? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to? (
/showthread.php?tid=142392)
How to? -
Razvann - 18.04.2010
I'm going to make a weapon-giver system, but idk how to check if that player is having a melee like knife.
Re: How to? -
Correlli - 18.04.2010
https://sampwiki.blast.hk/wiki/GetPlayerWeaponData
Re: How to? -
Razvann - 18.04.2010
Quote:
Originally Posted by Don Correlli
|
Ok, know that function but I don't know how to use it.. You can give me an example, please?
Re: How to? -
Correlli - 18.04.2010
Quote:
Originally Posted by Razvann
You can give me an example, please?
|
http://forum.sa-mp.com/index.php?top...3090#msg763090
Re: How to? -
Razvann - 18.04.2010
Quote:
Originally Posted by Don Correlli
|
pawn Код:
if(strcmp(x_nra,"melee1",true) == 0)
{
new weapons[13][2];
for(new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
}
if(weapons[1][0] == 2)
{
GivePlayerWeapon(giveplayerid, 2, weapons[i][1]);
RemovePlayerWeapon(playerid, 2);
}
return 1;
}
Here's what I've made, I haven't understood very good, is it good?