SendCommand
#1

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 )
Reply
#2

Any ?
Reply
#3

Stop Double Posting.
And Please clear What you want there?
Reply
#4

Код:
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.");
Reply
#5

PHP код:
    if(GetPlayerMoney(playerid) > 10000)
    {
        
SetPlayerHealth(playerid0); //This will kill player
    
}
    else
    {
        
SendClientMessage(playeridred"Error:You need more cash to do this."); } 
Reply
#6

Oh i dont wanna kill player its just an example of a command
Reply
#7

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.
");
Reply
#8

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
Reply
#9

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
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)