OnDialogResponse not gettin user input! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnDialogResponse not gettin user input! (
/showthread.php?tid=579678)
OnDialogResponse not gettin user input! -
VanillaRain - 29.06.2015
HERE IS MY CODE:
CODE
I dunno why when I'm typing the car name it continue saying "That vehicle name was not found" even if i type it correctly. any help?
Re: OnDialogResponse not gettin user input! -
kloning1 - 29.06.2015
post full code on dialogid 1
Re: OnDialogResponse not gettin user input! -
VanillaRain - 29.06.2015
didn't understood what u need but full code is linked above
Re: OnDialogResponse not gettin user input! -
kloning1 - 29.06.2015
ok if you dnt understnd, maybe this script can help you, i edit from your paste
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1) dialogid
{
if(strlen(inputtext))
{
new vehicle = GetVehicleModelIDFromName(inputtext);
if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, l_red, "That vehicle name was not found");
else
{
if(GetPlayerMoney(playerid) >= 50000)
{
GivePlayerMoney(playerid, -50000);
CreateVehicle(vehicle, 2126.34, -1143.67, 24.88, 90, -1, -1, -1);
}
else return SendClientMessage(playerid, l_red, "INSUFFICIENT MONEY! YOU NEED 50000 TO BUY A CAR!");
}
}
}
return 1;
}
Re: OnDialogResponse not gettin user input! -
VanillaRain - 29.06.2015
Quote:
Originally Posted by kloning1
ok if you dnt understnd, maybe this script can help you, i edit from your paste
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 1) dialogid { if(strlen(inputtext)) { new vehicle = GetVehicleModelIDFromName(inputtext); if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, l_red, "That vehicle name was not found"); else { if(GetPlayerMoney(playerid) >= 50000) { GivePlayerMoney(playerid, -50000); CreateVehicle(vehicle, 2126.34, -1143.67, 24.88, 90, -1, -1, -1); } else return SendClientMessage(playerid, l_red, "INSUFFICIENT MONEY! YOU NEED 50000 TO BUY A CAR!"); } } } return 1; }
|
it will give me 4 errors:
Код:
G:\rp\filterscripts\carbuy.pwn(100) : warning 217: loose indentation
G:\rp\filterscripts\carbuy.pwn(127) : warning 217: loose indentation
G:\rp\filterscripts\carbuy.pwn(135) : warning 217: loose indentation
G:\rp\filterscripts\carbuy.pwn(176 -- 177) : error 028: invalid subscript (not an array or too many subscripts): "dialogid"
G:\rp\filterscripts\carbuy.pwn(176 -- 178) : error 001: expected token: "}", but found "if"
G:\rp\filterscripts\carbuy.pwn(180) : error 017: undefined symbol "GetVehicleModelIDFromName"
G:\rp\filterscripts\carbuy.pwn(192) : warning 209: function "OnDialogResponse" should return a value
G:\rp\filterscripts\carbuy.pwn(193) : error 010: invalid function or declaration
G:\rp\filterscripts\carbuy.pwn(195) : warning 203: symbol is never used: "aVehicleNames"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: OnDialogResponse not gettin user input! -
kloning1 - 29.06.2015
Click HERE, PASTEBIN
maybe will help you, edit by me

btw, don't forget to download zcmd by Zeex
Re: OnDialogResponse not gettin user input! -
VanillaRain - 29.06.2015
It works great! thx dude!