[Q] RequestClass
#1

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.
Reply
#2

If you've a login and register script, than you can save the weapon in that file and load it.
Reply
#3

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.
Reply
#4

You want a weapon on a skin?
Reply
#5

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.
Reply
#6

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
Reply
#7

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.
Reply
#8

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:
Reply
#9

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?
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)