(435)error 029: invalid expression, assumed zero (435) : error 017: undefined symbol "cmd_spawncar" (435) : error 029: invalid expression, assumed zero |
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 1:
{
switch(listitem)
{
case 0:
{
GivePlayerWeapon(playerid, 24, 500);
SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
}
case 1:
{
GivePlayerWeapon(playerid, 22, 500);
SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
}
case 2:
{
GivePlayerWeapon(playerid, 25, 500);
SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
}
case 3:
{
GivePlayerWeapon(playerid, 26, 500);
SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
}
case 4:
{
GivePlayerWeapon(playerid, 27, 500);
SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
}
case 5:
{
GivePlayerWeapon(playerid, 32, 500);
SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
}
case 6:
{
GivePlayerWeapon(playerid, 28, 500);
SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
}
case 7:
{
GivePlayerWeapon(playerid, 29, 500);
SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
}
case 8:
{
GivePlayerWeapon(playerid, 30, 500);
SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
}
case 9:
{
GivePlayerWeapon(playerid, 31, 500);
SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
}
case 10:
{
GivePlayerWeapon(playerid, 33, 500);
SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
}
}
}
}
return 1;
}
COMMAND:spawncar(playerid, params[])
{
new vehicleid, color1, color2;
if(!sscanf(params, "iii", vehicleid, color1, color2))
{
new vin;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
vin=CreateVehicle(vehicleid, x, y, z, 0.0, color1, color2, -1);
PutPlayerInVehicle(playerid, vin, 0);
}else{
SendClientMessage(playerid, COLOR_GREY, "ERROR: This command requires: /spawncar [vehicleid][color1][color2]");
}
return 1;
}