Need help? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help? (
/showthread.php?tid=101684)
Need help? -
gemadon - 11.10.2009
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new file[256];
new string[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(string), "\\Users\\%s.ini", pname);
if(dialogid == 1)
{
if(response)
{
new tmp[256];
tmp = dini_Get(file, "hashPW");
if(!dini_Exists(file))
{
SendClientMessage(playerid, COLOR_RED, "You are not registered! [KICK]");
Kick(playerid);
}
else if(udb_hash(inputtext) != strval(tmp))
{
format(string, 256, "Wrong Password For %s!", GetPlayerNameEx(playerid));
SendClientMessage(playerid, COLOR_YELLOW2, string);
}
else
{
//Codes
if(!response)
{
// Codes
}
}
}
}
}
return 1;
}
For some reason, the last response that I put, it doesnt work, so if I put response 1 at the top and response 0 at the bottom, response 0 wont work . .
Re: Need help? -
_Ben_[Fux-c.co.il RP] - 12.10.2009
Thats wierd .
Take this line:
pawn Код:
if(!response)
{
// Codes
}
Put it under:
Thats should work .
Re: Need help? -
gemadon - 12.10.2009
Quote:
Originally Posted by _Ben_[Fux-c.co.il RP
]
Thats wierd .
Take this line:
pawn Код:
if(!response) { // Codes }
Put it under:
Thats should work .
|
Tried that already, it worked for the if(!response) but then it stopped working for the (response) at the bottom, whatever is at the bottom stops working
Re: Need help? -
Joe Staff - 12.10.2009
The only thing I know that prevents code from continuing is when a cell of an array is called that doesn't exist.
Example:
pawn Код:
new array[5];
array[6]=10; //Script Hault Here
Same can go for strings
pawn Код:
new funnyword[5];
funnyword="Pickleweasle"; //String input is too large for the array
Re: Need help? -
gemadon - 13.10.2009
Nope, arrays are fine, just double checked everything,
Can someone help me?