How to send a ClientMessage in this?
#1

Код:
    if (strcmp("/ogate", cmdtext, true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 20, 1544.94104004,-1622.77990723,12.38281250))
	{
        MoveObject(gate, 1544.63146973,-1631.57128906,12.38281250, 4.00);
        SendClientMessage(playerid, 0xFF000000, "You have successfully open the gate!");
	}
        return 1;
}
        if (strcmp("/cgate", cmdtext, true) == 0)
    {
    	if(IsPlayerInRangeOfPoint(playerid, 20, 1544.94104004,-1622.77990723,12.38281250))
	{
        MoveObject(gate, 1544.94104004,-1622.77990723,12.38281250, 4.00);
        SendClientMessage(playerid, 0xFF000000, "You have successfully closed the gate!");
	}
        return 1;
	}
I want to send a message saying you can't close the gate from here, instead of it being SERVER: Unknown Command, if you're not near the gate.
Reply
#2

Quote:
Originally Posted by Rabbayazza
Посмотреть сообщение
Код:
    if (strcmp("/ogate", cmdtext, true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 20, 1544.94104004,-1622.77990723,12.38281250))
	{
        MoveObject(gate, 1544.63146973,-1631.57128906,12.38281250, 4.00);
        SendClientMessage(playerid, 0xFF000000, "You have successfully open the gate!");
	}
        return 1;
}
        if (strcmp("/cgate", cmdtext, true) == 0)
    {
    	if(IsPlayerInRangeOfPoint(playerid, 20, 1544.94104004,-1622.77990723,12.38281250))
	{
        MoveObject(gate, 1544.94104004,-1622.77990723,12.38281250, 4.00);
        SendClientMessage(playerid, 0xFF000000, "You have successfully closed the gate!");
	}
        return 1;
	}
I want to send a message saying you can't close the gate from here, instead of it being SERVER: Unknown Command, if you're not near the gate.
PHP код:
if (strcmp("/ogate"cmdtexttrue) == 0)
{
    if(!
IsPlayerInRangeOfPoint(playerid201544.94104004,-1622.77990723,12.38281250)) return SendClientMessage(playerid, -1"You are not near a gate!");
     
MoveObject(gate1544.63146973,-1631.57128906,12.382812504.00);
      
SendClientMessage(playerid0xFF000000"You have successfully open the gate!");
       return 
1;
}
if (
strcmp("/cgate"cmdtexttrue) == 0)
{
    if(!
IsPlayerInRangeOfPoint(playerid201544.94104004,-1622.77990723,12.38281250)) return SendClientMessage(playerid, -1"You are not near a gate!");
     
MoveObject(gate1544.94104004,-1622.77990723,12.382812504.00);
      
SendClientMessage(playerid0xFF000000"You have successfully closed the gate!");
       return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)