SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 31/01/2020, 02:13 PM   #1
pushline
Little Clucker
 
Join Date: Dec 2018
Posts: 32
Reputation: 0
Default dialog message

hey, gm.
i'm doing a sampcac fs to my dm server, and i want to the non-cac players, when click on "cac" (only cac players)
send a message to "you are not using cac, spawned on non-cac world"

and i dont know how to do with a else, can i do removing the else, and doing a else talking the message, and doing another if with the usingsampcac == false?

Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_TADECAC)
	{
	 	if(response)
     	{
	        if(usingsampcac[playerid] == true)
	        SendClientMessage(playerid, -1, "{BD0D0D}You are using CAC, nice! Try /commands , and have a Good Game !");
	        SetPlayerVirtualWorld(playerid, 81);
	        SetPlayerInterior(playerid, 0);
	        SetPlayerArmour(playerid, 100.0);
	        SetPlayerHealth(playerid, 100.0);
	        MostrouOBagulho();
	        ResetPlayerWeapons(playerid);
	        //SetPlayerRandomPos(playerid);
			SpawnPlayer(playerid);
 		}
		else
		{
	        if(usingsampcac[playerid] == false)
	        SendClientMessage(playerid, -1, "{BD0D0D}You are not using CAC! Try /commands , and have a Good Game !");
	        SetPlayerVirtualWorld(playerid, 0);
	        SetPlayerInterior(playerid, 0);
         	SetPlayerArmour(playerid, 100.0);
	        SetPlayerHealth(playerid, 100.0);
	        MostrouOBagulho();
	        ResetPlayerWeapons(playerid);
            //SetPlayerRandomPos(playerid);
			SpawnPlayer(playerid);
  		}
    }
	return 1;
}

stock MostrouOBagulho()
{
    print("[debug] testecac stock");
	Mostrou = 1;
}
pushline is offline   Reply With Quote
Old 31/01/2020, 02:35 PM   #2
Zoxy
Little Clucker
 
Join Date: Jan 2020
Posts: 5
Reputation: 0
Default Re: dialog message

Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_TADECAC)
	{
	 	if(response)
     	{
	        if(usingsampcac[playerid] == false) return SendClientMessage(playerid, -1, "{BD0D0D}You are not using CAC! Try /commands , and have a Good Game !");
			SendClientMessage(playerid, -1, "{BD0D0D}You are using CAC, nice! Try /commands , and have a Good Game !");
	        SetPlayerVirtualWorld(playerid, 81);
	        SetPlayerInterior(playerid, 0);
	        SetPlayerArmour(playerid, 100.0);
	        SetPlayerHealth(playerid, 100.0);
	        MostrouOBagulho();
	        ResetPlayerWeapons(playerid);
	        //SetPlayerRandomPos(playerid);
			SpawnPlayer(playerid);
 		}
    }
	return 1;
}

stock MostrouOBagulho()
{
    print("[debug] testecac stock");
	Mostrou = 1;
}
Zoxy is offline   Reply With Quote
Old 31/01/2020, 02:48 PM   #3
pushline
Little Clucker
 
Join Date: Dec 2018
Posts: 32
Reputation: 0
Default Re: dialog message

Quote:
Originally Posted by Zoxy View Post
Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_TADECAC)
	{
	 	if(response)
     	{
	        if(usingsampcac[playerid] == false) return SendClientMessage(playerid, -1, "{BD0D0D}You are not using CAC! Try /commands , and have a Good Game !");
			SendClientMessage(playerid, -1, "{BD0D0D}You are using CAC, nice! Try /commands , and have a Good Game !");
	        SetPlayerVirtualWorld(playerid, 81);
	        SetPlayerInterior(playerid, 0);
	        SetPlayerArmour(playerid, 100.0);
	        SetPlayerHealth(playerid, 100.0);
	        MostrouOBagulho();
	        ResetPlayerWeapons(playerid);
	        //SetPlayerRandomPos(playerid);
			SpawnPlayer(playerid);
 		}
    }
	return 1;
}

stock MostrouOBagulho()
{
    print("[debug] testecac stock");
	Mostrou = 1;
}
nope, doesn't returns the message to the non-cac
pushline is offline   Reply With Quote
Old 03/02/2020, 08:54 PM   #4
pushline
Little Clucker
 
Join Date: Dec 2018
Posts: 32
Reputation: 0
Default Re: dialog message

someone?
pushline is offline   Reply With Quote
Old 03/02/2020, 10:10 PM   #5
Runn3R
Huge Clucker
 
Runn3R's Avatar
 
Join Date: Dec 2013
Location: Croatia, Split
Posts: 396
Reputation: 35
Default Re: dialog message

Okay so i don't know what is samp CAC but okay.

You are giving a question to the players and they have to answer it by clicking yes or no right? Do you have 'CAC' and 'NON cac' in your showplayerdialog?

Or are you trying to do if a NON cac player presses CAC the message pops out?
Runn3R is online now   Reply With Quote
Old 03/02/2020, 11:29 PM   #6
Symon
Gangsta
 
Symon's Avatar
 
Join Date: Apr 2019
Location: Italy
Posts: 638
Reputation: 42
Default Re: dialog message

Quote:
Originally Posted by Runn3R View Post
Okay so i don't know what is samp CAC but okay.

You are giving a question to the players and they have to answer it by clicking yes or no right? Do you have 'CAC' and 'NON cac' in your showplayerdialog?

Or are you trying to do if a NON cac player presses CAC the message pops out?
Sa-Mp CAC is an external anticheat.
__________________



Find what you love and let it kill you.
Symon is offline   Reply With Quote
Old 14/02/2020, 11:34 PM   #7
pushline
Little Clucker
 
Join Date: Dec 2018
Posts: 32
Reputation: 0
Default Re: dialog message

Quote:
Originally Posted by Runn3R View Post
Okay so i don't know what is samp CAC but okay.

You are giving a question to the players and they have to answer it by clicking yes or no right? Do you have 'CAC' and 'NON cac' in your showplayerdialog?

Or are you trying to do if a NON cac player presses CAC the message pops out?
like, i'm a not cac user, when the noncac clicks on "CAC WORLD" pops a message saying "haha ur funny, go to non cac" < spawned

and like, when i click on "CAC WORLD" doesnt pops a message of "oh wow u using cac etc"
pushline is offline   Reply With Quote
Old 14/02/2020, 11:36 PM   #8
pushline
Little Clucker
 
Join Date: Dec 2018
Posts: 32
Reputation: 0
Default Re: dialog message

Quote:
Originally Posted by Runn3R View Post
Okay so i don't know what is samp CAC but okay.

You are giving a question to the players and they have to answer it by clicking yes or no right? Do you have 'CAC' and 'NON cac' in your showplayerdialog?

Or are you trying to do if a NON cac player presses CAC the message pops out?
PHP Code:
public OnPlayerSpawn(playerid)
{
    print(
"[debug] testecac onplayerspawn");
    if(
Mostrou == 0)
    {
        
ShowPlayerDialog(playeridDIALOG_TADECACDIALOG_STYLE_MSGBOX"SAMPCAC/NOCAC","Choose the mode!\nEscolha seu modo!""{33AA33}CAC""{FF0000}NO CAC");
    }
    else if(
Mostrou == 1)
    {
        
//Deixar vazio
    
}
    return 
1;

pushline is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Message into dialog boy Scripting Help 2 11/05/2016 08:40 PM
Message dialog box help. Player23 Scripting Help 13 25/12/2013 02:55 PM
Dialog response not Sending Message [Input Dialog] Deal-or-die Scripting Help 8 08/05/2012 02:10 PM
Dialog message lenght. Shetch Scripting Help 4 31/08/2011 10:03 PM
MESSAGE DIALOG BOX SIMPLE PLZ HELP :(! Iphone1234g Help Archive 3 16/06/2011 12:56 PM


All times are GMT. The time now is 11:55 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.