I NEED HELP WITH WEAPONS
#1

IS THERE ANY WAY THAT PLAYERS CAN HAVE MORE THAN THREE WEAPONS WHEN THEY SPAWN FOR EXAMPLE:
AddPlayerClassEx(0, 292, 1673.6190, -2122.3142, 14.1460, 296.6250, 24,500, 29,1000, 27,1000);//eagle,mp5,cshotgun
BUT I WANT TO MORE WEAPONS IS THERE ANY POSSIBLE WAY TO DO SO
I ALSO SEARCHED AND I FOUND NOTHING CAN SOME ONE PLEASE HELP
I ALSO TRIED DOING GivePlayerWeapon(playerid, weaponid, ammo)
BUT I JUS DONT KNOW WHERE TO PUT IT
AND THANKS INADVANCE
Reply
#2

GivePlayerWeapon at OnPlayerSpawn.
Reply
#3

It's better to put GivePlayerWeapon on the OnPlayerSpawn than on AddPlayerClass, well that's atleast what I do, if you got classes like assault and sniper etc.
So I suggest you to remove the weapons from AddPlayerClass and put them under OnPlayerSpawn like the following:
pawn Код:
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 29, 1000);
GivePlayerWeapon(playerid, 27,1000);

// And the other remaining weapons you want here
Reply
#4

Use
pawn Код:
GivePlayerWeapon(playerid , weaponid, ammo_ammounts);
GivePlayerWeapon(playerid , weaponid, ammo_ammounts);
GivePlayerWeapon(playerid , weaponid, ammo_ammounts);
GivePlayerWeapon(playerid , weaponid, ammo_ammounts);
.....................
Reply
#5

i tried that and i got a error
(1329) : error 021: symbol already defined: "OnPlayerSpawn"
(1329) : warning 209: function "OnPlayerSpawn" should return a value
(2440) : warning 235: public function
and how do i do the pawn code
Reply
#6

can u add me on skype
xlnadeem.jamil
and help me from there please
Reply
#7

search for the OnPlayerSpawn, Don't write it.
write these after
pawn Код:
OnPlayerSpawn(playerid){
it will be :
pawn Код:
OnPlayerSpawn(playerid){
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 29, 1000);
GivePlayerWeapon(playerid, 27,1000);
}
//credits to Jimmy
Reply
#8

Quote:
Originally Posted by M3HR4N
Посмотреть сообщение
search for the OnPlayerSpawn, Don't write it.
write these after
pawn Код:
OnPlayerSpawn(playerid){
it will be :
pawn Код:
OnPlayerSpawn(playerid){
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 29, 1000);
GivePlayerWeapon(playerid, 27,1000);
}
//credits to Jimmy
lol soon as i do that i dont get errors but pawno crashes
Reply
#9

pawn Код:
public OnPlayerSpawn(playerid)
{
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 29, 1000);
GivePlayerWeapon(playerid, 27,1000);
return 1;
}
Reply
#10

Cause u hv not return 1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)