[Q] RequestClass - 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: [Q] RequestClass (
/showthread.php?tid=92722)
[Q] RequestClass -
PlayMaker - 21.08.2009
How can I do the skin holding a weapon ( eg. minigun ) while choosing the skin ?
GivePlayerWeapon on public OnPlayerRequestClass don't work, I think. :'S
Thanks.
Re: [Q] RequestClass -
CAR - 21.08.2009
If you've a login and register script, than you can save the weapon in that file and load it.
Re: [Q] RequestClass -
PlayMaker - 21.08.2009
But i don't want to save player's weapons.
Just skins holding a minigun for eg while we're choosing them.
I though in:
pawn Код:
public OnPlayerRequestClass(playerid, classid) {
GivePlayerWeapon(playerid, 38, 1000);
return true; }
But logically this don't work.
Re: [Q] RequestClass -
CAR - 21.08.2009
You want a weapon on a skin?
Re: [Q] RequestClass -
PlayMaker - 21.08.2009
Quote:
|
Originally Posted by CAR
You want a weapon on a skin?
|
Basically yes.
But I'm not see what type of code can I use.
Re: [Q] RequestClass -
CAR - 21.08.2009
You mean this:
Код:
// POST THIS IN ONGAMEMODEINIT
AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
Код:
skin The skin which the player will spawn with.
Float:X The X-coordinate of the class' spawn position.
Float:Y The Y-coordinate of the class' spawn position.
Float:Z The Z-coordinate of the class' spawn position.
Float:Angle The direction in which the player needs to be facing after spawning.
weapon1 The first spawn-weapon for the player.
weapon1_ammo The amount of ammunition for the primary spawnweapon.
weapon2 The second spawn-weapon for the player.
weapon2_ammo The amount of ammunition for the second spawnweapon.
weapon3 The third spawn-weapon for the player.
weapon3_ammo The amount of ammunition for the third spawnweapon.
https://sampwiki.blast.hk/wiki/AddPlayerClass
Re: [Q] RequestClass -
PlayMaker - 21.08.2009
But that it isn't only on player spawn ? I mean, the player only holds the weapon on spawn.
And I want the player holds while I'm choosing class / skin.
Re: [Q] RequestClass -
_Vortex - 21.08.2009
Quote:
|
Originally Posted by CAR
You mean this:
Код:
// POST THIS IN ONGAMEMODEINIT
AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
Код:
skin The skin which the player will spawn with.
Float:X The X-coordinate of the class' spawn position.
Float:Y The Y-coordinate of the class' spawn position.
Float:Z The Z-coordinate of the class' spawn position.
Float:Angle The direction in which the player needs to be facing after spawning.
weapon1 The first spawn-weapon for the player.
weapon1_ammo The amount of ammunition for the primary spawnweapon.
weapon2 The second spawn-weapon for the player.
weapon2_ammo The amount of ammunition for the second spawnweapon.
weapon3 The third spawn-weapon for the player.
weapon3_ammo The amount of ammunition for the third spawnweapon.
https://sampwiki.blast.hk/wiki/AddPlayerClass
|
He wants the characters on OnPlayerRequestClass to be holding a minigun.
I'm not sure this is possible though sorry D:
Re: [Q] RequestClass -
introzen - 21.08.2009
AddPlayerClass(skin, Float

, Float:y, Float:z, Float:Angle, 38, 1, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
And then OnPlayerSpawn(playerid)
just set ResetPlayerWeapons(playerid);
Doesn't that work?
Re: [Q] RequestClass -
CAR - 21.08.2009
Minigun is a hack isn't it?
If it's a hack, then the server haven't got an ID of the weapon, and can't give it back.