10.07.2015, 14:24
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",TinyString, TinyString2)) 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;}