03.03.2017, 19:57
hello, im trying to make a shop but when i trying to save it.. giving me errors idk how to fix it...
All Errors in OnDialogResponse...
All Errors in OnDialogResponse...
Код:
error 001: expected token: "-string end-", but found "-identifier-" error 017: undefined symbol "COL_ORANGE" warning 215: expression has no effect error 001: expected token: "-string end-", but found "-identifier-" fatal error 107: too many error messages on one line
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 55)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid,55+1,DIALOG_STYLE_LIST,""COL_ORANGE"Vehicles",""COL_GREY"Sultan "COL_GREEN"$ 20.000\n"COL_GREY"New Maverick "COL_GREEN"$ 25.000\n"COL_GREY"NRG-500 "COL_GREEN"$ 11.000\n"COL_GREY"Sanchez "COL_GREEN"$ 10.000\n"COL_GREY"Speeder "COL_GREEN"$ 17.000\n"COL_GREY"Squallo "COL_GREEN"$ 17.000\n"COL_GREY"Hunter "COL_GREEN"$ 250.000"COL_GREY"Monster Truck "COL_GREEN"$ 40.000\n"COL_GREY"","Select", "Cancel");
}
if(listitem == 1)
{
ShowPlayerDialog(playerid,55+2,DIALOG_STYLE_LIST,""COL_ORANGE"Weapons",""COL_GREY"Knife "COL_GREEN"$ 200\n"COL_GREY"Desert Eagle "COL_GREEN"$ 12.000\n"COL_GREY"Sawn-offs "COL_GREEN"$ 25.000\n"COL_GREY"SMG "COL_GREEN"$ 15.000\n"COL_GREY"M4 "COL_GREEN"$ 24.000","Select", "Cancel");
}
}
return 1;
}
if(dialogid == 55+1)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 20000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
new shopcar[MAX_PLAYERS];
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
shopcar[playerid] = AddStaticVehicle(560, x, y, z, 82.2873,-1, -1);
GivePlayerMoney(playerid,-20000);
SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Sultan.");
PutPlayerInVehicle(playerid, shopcar[playerid], 0);
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) < 25000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
new shopcar[MAX_PLAYERS];
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
shopcar[playerid] = AddStaticVehicle(488, x, y, z, 82.2873,-1, -1);
GivePlayerMoney(playerid,-25000);
SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" News Maverick.");
PutPlayerInVehicle(playerid, shopcar[playerid], 0);
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) < 11000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
new shopcar[MAX_PLAYERS];
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
shopcar[playerid] = AddStaticVehicle(522, x, y, z, 82.2873,-1, -1);
GivePlayerMoney(playerid,-11000);
SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" NRG-500.");
PutPlayerInVehicle(playerid, shopcar[playerid], 0);
}
if(listitem == 3)
{
if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
new shopcar[MAX_PLAYERS];
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
shopcar[playerid] = AddStaticVehicle(468, x, y, z, 82.2873,-1, -1);
GivePlayerMoney(playerid,-10000);
SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Sanchez.");
PutPlayerInVehicle(playerid, shopcar[playerid], 0);
}
if(listitem == 4)
{
if(GetPlayerMoney(playerid) < 17000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
new shopcar[MAX_PLAYERS];
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
shopcar[playerid] = AddStaticVehicle(452, x, y, z, 82.2873,-1, -1);
GivePlayerMoney(playerid,-17000);
SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Speeder.");
PutPlayerInVehicle(playerid, shopcar[playerid], 0);
}
if(listitem == 5)
{
if(GetPlayerMoney(playerid) < 17000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
new shopcar[MAX_PLAYERS];
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
shopcar[playerid] = AddStaticVehicle(446, x, y, z, 82.2873,-1, -1);
GivePlayerMoney(playerid,-17000);
SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Squallo.");
PutPlayerInVehicle(playerid, shopcar[playerid], 0);
}
if(listitem == 6)
{
if(GetPlayerMoney(playerid) < 250000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
new shopcar[MAX_PLAYERS];
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
shopcar[playerid] = AddStaticVehicle(520, x, y, z, 82.2873,-1, -1);//446 moet nog hydra id worden
GivePlayerMoney(playerid,-250000);
SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Hydra.");
PutPlayerInVehicle(playerid, shopcar[playerid], 0);
}
if(listitem == 7)
{
if(GetPlayerMoney(playerid) < 400000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
new shopcar[MAX_PLAYERS];
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
shopcar[playerid] = AddStaticVehicle(406, x, y, z, 82.2873,-1, -1);//446 moet nog hydra id worden
GivePlayerMoney(playerid,-40000);
SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Monster.");
PutPlayerInVehicle(playerid, shopcar[playerid], 0);
}
}
return 1;
}
if(dialogid == 55+2)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid,-200);
SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Knife.");
GivePlayerWeapon(playerid, 4, 1);
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) < 12000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid,-12000);
SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Desert Eagle.");
GivePlayerWeapon(playerid, 24, 999);
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) < 25000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid,-25000);
SendClientMessage(playerid, red, ""COL_GREY"You bought"COL_ORANGE" Sawn Offs.");
GivePlayerWeapon(playerid, 26, 999);
}
if(listitem == 3)
{
if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid,-15000);
SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" SMG.");
GivePlayerWeapon(playerid, 29, 999);
}
if(listitem == 4)
{
if(GetPlayerMoney(playerid) < 24000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid,-24000);
SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" M4.");
GivePlayerWeapon(playerid, 31, 999);
}
return 1;
}
}
return 0;
}