Pickup problem
#1

I'm making WP system in dialog and in response some i resetplayerweapons it only work for the first 4 cases (0 1 2 3) but it doesn't reset weapons in case 4
Код:
case 0:
 {
             ResetPlayerWeapons(playerid);
	    GivePlayerWeapon(playerid, 24, 500);
}

 case 1:
   {

	ResetPlayerWeapons(playerid);
	GivePlayerWeapon(playerid, 26, 900);
   }
case 2:
 {					
                       ResetPlayerWeapons(playerid);
		GivePlayerWeapon(playerid, 38, 99999999);
     }
 case 3:
{
		ResetPlayerWeapons(playerid);
		GivePlayerWeapon(playerid, 4, 1); //Knife.
}
	
case 4:
{
		ResetPlayerWeapons(playerid);
	     GivePlayerWeapon(playerid,43,1);
 }
At case 4 it only give weapon and doesn't reset please help i need it fast
Reply
#2

EDITED - please check
Reply
#3

Hello Rockyyy,
try to use our code like the code below.

PHP код:
ResetPlayerWeapons(playerid);
case 
0:{GivePlayerWeapon(playerid24500);}
case 
1:{GivePlayerWeapon(playerid26900);}
case 
2:{GivePlayerWeapon(playerid3899999999);}
case 
3:{GivePlayerWeapon(playerid41);}
case 
4:{GivePlayerWeapon(playerid,43,1);} 
Reply
#4

Quote:
Originally Posted by GangstaSunny
Посмотреть сообщение
Hello Rockyyy,
try to use our code like the code below.

PHP код:
ResetPlayerWeapons(playerid);
case 
0:{GivePlayerWeapon(playerid24500);}
case 
1:{GivePlayerWeapon(playerid26900);}
case 
2:{GivePlayerWeapon(playerid3899999999);}
case 
3:{GivePlayerWeapon(playerid41);}
case 
4:{GivePlayerWeapon(playerid,43,1);} 
Was just going to do this
Reply
#5

Im using these codes under ondialogresponse

if(response)
{
switch(dialogid)
{
case 90:
{
switch(listitem)
{
Reply
#6

I fixed it ,
instead of having
Код:
ResetPlayerWeapons(playerid);
I made it like that
Код:
ResetPlayerWeapons(playerid);
ResetPlayerWeapons(playerid);
and it worked....... can someone tell me the reason why i have to duplicate my code so it works?!
Reply
#7

Technical issue. Dont ask. Just deal with it. Like Microsoft.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)