08.09.2012, 07:26
Well ya i was converting one of my scripts to zcmd, as it were dcmd before, but then i came to this code:
How can i convert the ' dcmd_prices(playerid, " ");' ?
pawn Код:
if(IsNumeric(text))
{
if(UserStats[playerid][Spawned] == 1 && ActiveMenu[playerid][MedicPricess2] == 1 && (gTeam[playerid] == TEAM_MEDIC || gTeam[playerid] == TEAM_PVTMED)) //
{
new medicpricelimitleast,medicpricelimitmax,string[128];
if(CarriedThrough[playerid] == 1) { medicpricelimitleast = 1000; medicpricelimitmax = 5000; }
if(CarriedThrough[playerid] == 2) { medicpricelimitleast = 2000; medicpricelimitmax = 5000; }
if(CarriedThrough[playerid] == 3) { medicpricelimitleast = 2500; medicpricelimitmax = 7000; }
if(!IsNumeric(text)) { format(string,sizeof(string),"The Medic Service Price Must Be Between $%d - $%d!",medicpricelimitleast,medicpricelimitmax); SendClientMessage(playerid,COLOR_RED,string); return 0; }
new t2;
t2 = strval(text);
if(t2 < medicpricelimitleast || t2 > medicpricelimitmax) { format(string,sizeof(string),"The Medic Service Price Must Be Between $%d - $%d!",medicpricelimitleast,medicpricelimitmax); SendClientMessage(playerid,COLOR_RED,string); return 0; }
if(CarriedThrough[playerid] == 1) { MedicPrice[playerid][HEAL] = t2; format(string,sizeof(string),"* You Changed Your (Heal) Price, The New Price Is $%d",MedicPrice[playerid][HEAL]); }
if(CarriedThrough[playerid] == 2) { MedicPrice[playerid][CURE] = t2; format(string,sizeof(string),"* You Changed Your (Cure) Price, The New Price Is $%d",MedicPrice[playerid][CURE]); }
if(CarriedThrough[playerid] == 3) { MedicPrice[playerid][BOTHHEALCURE] = t2; format(string,sizeof(string),"* You Changed Your (Heal + Cure) Price, The New Price Is $%d",MedicPrice[playerid][BOTHHEALCURE]); }
SendClientMessage(playerid,COLOR_YAY,string);
if(!PlayerLogged[playerid]) return 0;
dcmd_prices(playerid, " ");
CheckMySQL();
if(!PlayerLogged[playerid]) return 0;
new stringer[500];
format(stringer, sizeof(stringer), "UPDATE users SET HEAL='%d',CURE='%d',BOTHHEALCURE='%d' WHERE Name='%s'",MedicPrice[playerid][HEAL],MedicPrice[playerid][CURE],MedicPrice[playerid][BOTHHEALCURE],UserStats[playerid][Name]);
mysql_query(stringer);
HideBox(playerid);
return 0;
}
}