SA-MP Forums Archive
Need help SendClientMessage - 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: Need help SendClientMessage (/showthread.php?tid=430419)



Need help SendClientMessage - canip - 13.04.2013

Hey i need help to SendClientMessage...


I will have it so a skin (285) can use the command. And another skin there try to use the command will the SendClientMessage send him a meassage " you can use this command "


Re: Need help SendClientMessage - Frede - 13.04.2013

Quote:
Originally Posted by canip
Посмотреть сообщение
Hey i need help to SendClientMessage...


I will have it so a skin (285) can use the command. And another skin there try to use the command will the SendClientMessage send him a meassage " you can use this command "
pawn Код:
if(GetPlayerSkin(playerid) == 285)
{
   //...
}
else return SendClientMessage(playerid, 0xFFFFAA, "you can use this command");



Re: Need help SendClientMessage - canip - 13.04.2013

What did you mean...

Can you try to put it in here

PHP код:
if(!strcmp(cmdtext"/openhq"true))
    {
        
SendClientMessage(playeridCOLOR_ORANGE"INFO: you have closed the gate");
        if(
IsPlayerInRangeOfPoint(playerid,10.0,244.0000000,72.5000000,1002.5999800))
        {
            
MoveObject(hq,244.0000000,72.5000000,1002.5999800,2.00000000.00.00.0);
            return 
1;
        }
    }
    if(!
strcmp(cmdtext"/closehq"true))
    {
        
SendClientMessage(playeridCOLOR_ORANGE"INFO: you have closed the gate");
        if(
IsPlayerInRangeOfPoint(playerid,10.0,245.3999900,72.5000000,1002.5999800))
        {
            
MoveObject(hq,245.3999900,72.5000000,1002.5999800,2.00000000.00.00.0);
            return 
1;
        }
    } 



Re: Need help SendClientMessage - [XST]O_x - 13.04.2013

pawn Код:
if(!strcmp(cmdtext, "/openhq", true))
{
    if(GetPlayerSkin(playerid) == 285) {
    SendClientMessage(playerid, COLOR_ORANGE, "INFO: you have closed the gate");
    if(IsPlayerInRangeOfPoint(playerid,10.0,244.0000000,72.5000000,1002.5999800))
    {
        MoveObject(hq,244.0000000,72.5000000,1002.5999800,2.0000000, 0.0, 0.0, 0.0);
        return 1;
    }
}
else return SendClientMessage(playerid, COLOR_ORANGE, "You cannot use this command");
}

    if(!strcmp(cmdtext, "/closehq", true))
    {
        if(GetPlayerSkin(playerid) == 285) {
        SendClientMessage(playerid, COLOR_ORANGE, "INFO: you have closed the gate");
        if(IsPlayerInRangeOfPoint(playerid,10.0,245.3999900,72.5000000,1002.5999800))
        {
            MoveObject(hq,245.3999900,72.5000000,1002.5999800,2.0000000, 0.0, 0.0, 0.0);
            return 1;
        }
    }  
else return SendClientMessage(playerid, COLOR_ORANGE, "You cannot use this command");
}



Re: Need help SendClientMessage - Isolated - 13.04.2013

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
pawn Код:
if(!strcmp(cmdtext, "/openhq", true))
{
    if(GetPlayerSkin(playerid) == 285) {
    SendClientMessage(playerid, COLOR_ORANGE, "INFO: you have closed the gate");
    if(IsPlayerInRangeOfPoint(playerid,10.0,244.0000000,72.5000000,1002.5999800))
    {
        MoveObject(hq,244.0000000,72.5000000,1002.5999800,2.0000000, 0.0, 0.0, 0.0);
        return 1;
    }
}
else return SendClientMessage(playerid, COLOR_ORANGE, "You cannot use this command");
}

    if(!strcmp(cmdtext, "/closehq", true))
    {
        if(GetPlayerSkin(playerid) == 285) {
        SendClientMessage(playerid, COLOR_ORANGE, "INFO: you have closed the gate");
        if(IsPlayerInRangeOfPoint(playerid,10.0,245.3999900,72.5000000,1002.5999800))
        {
            MoveObject(hq,245.3999900,72.5000000,1002.5999800,2.0000000, 0.0, 0.0, 0.0);
            return 1;
        }
    }  
else return SendClientMessage(playerid, COLOR_ORANGE, "You cannot use this command");
}
You forgot to close the brackets. <3