Help with a car spawn dialog?
#1

I've got the dialog working, but this (in OnDialogResponse) takes the money, but doesn't spawn the Club.

Код:
	if(dialogid == 2 && response)
	{
	  switch(listitem)
	 {
	 case 0:
	 {
	 if(PlayerInfo[playerid][Cash] <= 2000)
		{
		GivePlayerMoney(playerid, -2000);
		CreateVehicle(589, SpawnCarX, SpawnCarY, SpawnCarZ, SpawnCarAngle, -1, -1, 9999);
		} else {
		SendClientMessage(playerid, COLOR_WHITE, "You need more money, fool!");
		}
	 }
  }
 }
Here's the rest of my code:
(At top of script
Код:
new Float:SpawnCarX, Float:SpawnCarY, Float:SpawnCarZ, Float:SpawnCarAngle;
(In OnPlayerCommandText
Код:
	if (strcmp(cmd, "/car", true) == 0)
	{
			GetPlayerPos(playerid, SpawnCarX, SpawnCarY, SpawnCarY);
			GetPlayerFacingAngle(playerid, SpawnCarAngle);
	ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Spawnable Cars", "Club ($2000)\nFlash ($2500)\nSultan ($5000)\nJester ($7500)", "Purchase", "Cancel");
	return 1;
	}
Reply


Messages In This Thread
Help with a car spawn dialog? - by jameskmonger - 14.01.2010, 16:23
Re: Help with a car spawn dialog? - by jameskmonger - 14.01.2010, 16:58
Re: Help with a car spawn dialog? - by Badger(new) - 14.01.2010, 17:05
Re: Help with a car spawn dialog? - by ettans - 14.01.2010, 17:08
Re: Help with a car spawn dialog? - by MadeMan - 14.01.2010, 17:09

Forum Jump:


Users browsing this thread: 1 Guest(s)