SendRconCommand
#1

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;
}
Reply


Messages In This Thread
SendRconCommand - by truckingserver - 22.12.2012, 20:15
Re: SendRconCommand - by Randy More - 22.12.2012, 20:21
Re: SendRconCommand - by RedCrossER - 22.12.2012, 20:31
Re: SendRconCommand - by Konstantinos - 22.12.2012, 20:33
Re: SendRconCommand - by truckingserver - 22.12.2012, 20:35
Re: SendRconCommand - by truckingserver - 22.12.2012, 20:41
Re: SendRconCommand - by RedCrossER - 22.12.2012, 20:47
Re: SendRconCommand - by RedCrossER - 22.12.2012, 20:51

Forum Jump:


Users browsing this thread: 7 Guest(s)