I 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)
+--- Thread: I need help (
/showthread.php?tid=379448)
I need help -
Sgt.TheDarkness - 21.09.2012
I'm trying to make so when a player connects to the server, when they spawn, they have to agree to the rules, and if they don't, it kicks them, but only the first half of it works.. I'm clueless xD
pawn Код:
if(response)
{
switch(dialogid)
{
case 1244:
{
if(response)
{
SendClientMessage(playerid, COLOR_RED, "You've agreed to the terms and conditions, failure to comply with them will get you banned");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You've declined the rules, you have been disconnected");
Kick(playerid);
}
return 1;
}
AW: I need help -
Nero_3D - 21.09.2012
pawn Код:
if(response) // < This is the reason
{
switch(dialogid)
{
case 1244:
{
if(response)
{
SendClientMessage(playerid, COLOR_RED, "You've agreed to the terms and conditions, failure to comply with them will get you banned");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You've declined the rules, you have been disconnected");
Kick(playerid);
}
return 1;
}
Hope thats enough help
Re: I need help -
CoDeZ - 21.09.2012
pawn Код:
if(response)
{
switch(dialogid)
{
case 1244:
{
if(response) return SendClientMessage(playerid, COLOR_RED, "You've agreed to the terms and conditions, failure to comply with them will get you banned");
else
{
SendClientMessage(playerid, COLOR_RED, "You've declined the rules, you have been disconnected");
Kick(playerid);
}
return 1;
}
Re: I need help -
Sgt.TheDarkness - 21.09.2012
Still not working, It doesn't make any sense o.o
Re: I need help -
YourLord - 21.09.2012
So CoDeZ.. what's the point to post the same thing?
Try now.
pawn Код:
switch(dialogid)
{
case 1244:
{
if(response) return SendClientMessage(playerid, COLOR_RED, "You've agreed to the terms and conditions, failure to comply with them will get you banned");
else SendClientMessage(playerid, COLOR_RED, "You've declined the rules, you have been disconnected"),Kick(playerid);
return 1;
}
}
Re: I need help -
newbienoob - 21.09.2012
What do you mean by "but only the first half of it works.."?
Re: I need help -
Sgt.TheDarkness - 22.09.2012
Quote:
Originally Posted by newbienoob
What do you mean by "but only the first half of it works.."?
|
That, only the first half works, clicking agree says you've agreed to the terms, but when you click decline, nothing happens..
AW: I need help -
Nero_3D - 22.09.2012
It seems that you didnt understood my first post, so I explain it in more depth
pawn Код:
//
if(response) // First you check if he responded
{ // everything here only works if the player agreed!
switch(dialogid)
{
case 1244:
{
if(response) // you check again if he agreed
{ // but we already know that he agreed through the first check
SendClientMessage(playerid, COLOR_RED, "You've agreed to the terms and conditions, failure to comply with them will get you banned");
}
else // this will never happen because the player already agreed
{
SendClientMessage(playerid, COLOR_RED, "You've declined the rules, you have been disconnected");
Kick(playerid);
}
return 1;
}
// other cases
}
} // till here