Problem with a command
#1

PHP код:
CMD:bag(playerid,params[]){
if(
sscanf(params,"s",TinyString)) return MSG(playerid,C_RED,"[ERROR] {ff7777}Usage: /Bag [Store/Take]");
if(
strcmp(TinyString,"store",true) && strcmp(TinyString,"take",true)) return MSG(playerid,C_RED,"[ERROR] {ff7777}Usage: /Bag [Store/Take]");
if(!
strcmp(TinyString"store",true)){
if(
sscanf(params,"ss",TinyStringTinyString2)) return MSG(playerid,C_RED,"[ERROR] {ff7777}Usage: /Bag [Store] [Weapon/Drug Name]");}
if(
strcmp(TinyString,"weapon",true) && strcmp(TinyString,"weed",true) && strcmp(TinyString,"cocaine",true) && strcmp(TinyString,"ecstasy",true) && strcmp(TinyString,"heroin",true)) return MSG(playerid,C_RED,"[ERROR] {ff7777}Usage: /Bag [Store] [Weapon/Drug Name]");
if(!
strcmp(TinyString"weapon",true)){
new 
pWep GetPlayerWeapon(playerid);
new 
pAmo GetPlayerAmmo(playerid);
format(String,sizeof(String),"W%s",pWep);
DOF2_SetInt(pFile(playerid),String,1);
format(String,sizeof(String),"B%s",pWep);
DOF2_SetInt(pFile(playerid),String,pAmo);
SetPlayerAmmo(playerid,pWep,0);}
return 
1;} 
when i type /bag store weapon it sends me "[ERROR] Usage: /Bag [Store/Take]"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)