Setting value
#1

PHP код:
CMD:setvalue(playerid,params[])
{
new 
valueweaponid,string[200];
if(
sscanf(params"dk<weapon>"valueweaponid)) return SendClientMessage(playerid,0xFF0000F,"USAGE: /setvalue [Value] [WeaponName]"); // You need to put integer at first, and you can use sscanf kustom specifier to get weaponid by name
if(weaponid == 24)
{
Deagle value;
format(string,sizeof(string),"Succeffly setted Deagle value to %d",value);
SendClientMessage(playerid,0xFF0000F,string);
}
return 
1;

That is not working why?
Reply
#2

Your CMDS doesn't contain GivePlayerWeapon, fix it like this :

PHP код:
CMD:setvalue(playerid,params[]) 

   new 
valueweaponid,string[200]; 
   if(
sscanf(params"dk<weapon>"valueweaponid)) return SendClientMessage(playerid,0xFF0000F,"USAGE:  /setvalue [Value] [WeaponName]"); // You need to put integer at first, and you can use sscanf kustom specifier to    get weaponid by name 
   
if(weaponid == 24
   { 
      
Deagle value;
      
GivePlayerWeapon(playerid24value);
      
format(string,sizeof(string),"Succeffly setted Deagle value to %d",value); 
      
SendClientMessage(playerid,0xFF0000F,string); 
   } 
   return 
1

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)