SendCommand - 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: SendCommand (
/showthread.php?tid=401521)
[NON SOLVED] SendCommand -
truckingserver - 23.12.2012
Hello
Thanks for helping me in thread SendRconCommand
But now i wanna to domething else
The Code
Код:
#include <a_samp>
#define red 0xFF0000FF
new pickup;
public OnGameModeInit()
{
pickup = CreatePickup(1240, 23, -2059.2109, -91.5216, 35.3203, -1);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup)
{
ShowPlayerDialog(playerid,999,DIALOG_STYLE_MSGBOX, "Car","Infernus 10000 LT","Buy", "Close");
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 999)
{
if(response)
{
if(GetPlayerMoney(playerid) > 10000)
{
I WANT TO SEND HERE COMMAND
}
else
{
SendClientMessage(playerid, red, "Error:You need more cash to do this.");
}
}
}
return 1;
}
Read Where on script I WANT TO SEND HERE COMMAND
How can i send command ? ( NOT RCON )
Re: SendCommand -
truckingserver - 23.12.2012
Any ?
Re: SendCommand -
Avi Raj - 23.12.2012
Stop Double Posting.
And Please clear What you want there?
Re: SendCommand -
truckingserver - 23.12.2012
Код:
if(GetPlayerMoney(playerid) > 10000)
{
HERE
}
else
{
SendClientMessage(playerid, red, "Error:You need more cash to do this.");
When player Click buy ON Dialog
to send command
like :
Код:
{
if(GetPlayerMoney(playerid) > 10000)
{
/kill
}
else
{
SendClientMessage(playerid, red, "Error:You need more cash to do this.");
Re: SendCommand -
B-Matt - 23.12.2012
PHP код:
if(GetPlayerMoney(playerid) > 10000)
{
SetPlayerHealth(playerid, 0); //This will kill player
}
else
{
SendClientMessage(playerid, red, "Error:You need more cash to do this."); }
Re: SendCommand -
truckingserver - 23.12.2012
Oh i dont wanna kill player its just an example of a command
Re: [NON SOLVED] SendCommand -
truckingserver - 23.12.2012
Nobody Understand Me
Код:
{
if(GetPlayerMoney(playerid) > 10000)
{
Is it possible to send command like SendComamnd "my command"
}
else
{
SendClientMessage(playerid, red, "Error:You need more cash to do this.
");
Re: SendCommand -
DaRk_RaiN - 23.12.2012
Why do that when you can just
pawn Код:
SendClientMessage(playerid, -1, "You do not have enough money use /mycommand");
Then you can make the command in OnPlayerCommandText
Re: SendCommand -
truckingserver - 23.12.2012
Omagad !!!!
Код:
{
if(GetPlayerMoney(playerid) > 10000)
{
SendCommand "car 411"
}
else
{
SendClientMessage(playerid, red, "Error:You need more cash to do this.
How to send command /car 411
Re: SendCommand -
DaRk_RaiN - 23.12.2012
pawn Код:
{
if(GetPlayerMoney(playerid) > 10000)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
CreateVehicle(411, x+5, y-2, z+1, 82.2873, 0, 1, 5000000);
}
else
{
SendClientMessage(playerid, red, "Error:You need more cash to do this.
https://sampwiki.blast.hk/wiki/CreateVehicle