SendRconCommand - 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: SendRconCommand (
/showthread.php?tid=401424)
SendRconCommand -
truckingserver - 22.12.2012
Hi
I have an vehicle ownership
And when i do /rcon login MYPASS
then
/vcreate 411 10000 1 1
it Works
And look what i want to do with this command in Script
i wanna on play Clicks Buy in dialog
to send that command
But i tryed and dont work
Any suggestions ?
Код:
#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)
{
SendRconCommand("vcreate 411 10000 1 1");
}
else
{
SendClientMessage(playerid, red, "Error:You need more cash to do this.");
}
}
}
return 1;
}
Re: SendRconCommand -
Randy More - 22.12.2012
Show us the filterscript that contains the /vcreate command.
Re: SendRconCommand -
RedCrossER - 22.12.2012
lol vcreate is not a rcon cmd it's a cmd in that fs but while using that cmd by a player it check the player is rcon logged admin -
https://sampwiki.blast.hk/wiki/IsPlayerAdmin
Re: SendRconCommand -
Konstantinos - 22.12.2012
pawn Код:
SendRconCommand("vcreate 411 10000 1 1");
This is not the correct use of
SendRconCommand
In ZCMD, we can do it like
pawn Код:
cmd_vcreate(playerid, params);
And I'm not sure if you can change params to "411 10000 1 1".
Re: SendRconCommand -
truckingserver - 22.12.2012
Here The FS to /vcreate :
https://sampforum.blast.hk/showthread.php?tid=222233
Re: SendRconCommand -
truckingserver - 22.12.2012
If i delete This line from script
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You must be admin to use this command!");
Will it work ?
it compiles
Re: SendRconCommand -
RedCrossER - 22.12.2012
It will work but the cmd : /vcreate can be used by everyone
Re: SendRconCommand -
RedCrossER - 22.12.2012
But still you can't use sendrconcommand
You must use the cmd without send rcon cmd line you have to use it directly or you have to tell the script to execute that cmd vcreate like : if it is using dcmd then you have to do dcmd_vcreate bla bla