/sendto command help?
#4

You must download sscanf & zcmd includes ++ You must type this on the top of your script

pawn Код:
#include zcmd
#include sscanf
pawn Код:
CMD:sendto //LS Command
{
     if(IsPlayerAdmin(playerid)
     {
           new targetid,reason,str[128];
           if(sscanf(params,"us", targetid, reason)) return SendClientMessage(playerid, -1, "/sendto [Player ID] [Reason]");
            {
                   if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "Player not connected");
                   format(str,sizeof(str),"%s has teleported %s to LS",Name(playerid),Name(targetid);
                   SendClientMessageToAll(-1,str);
                   SetPlayerPos(playerid,1529.6,-1691.2,13.3);
             }
        }
         else return SendClientMessage(playerid,-1,"You can't use this command");
}
pawn Код:
CMD:sendto2 //SFCommand
{
     if(IsPlayerAdmin(playerid)
     {
           new targetid,reason,str[128];
           if(sscanf(params,"us", targetid, reason)) return SendClientMessage(playerid, -1, "/sendto [Player ID] [Reason]");
            {
                   if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "Player not connected");
                   format(str,sizeof(str),"%s has teleported %s to SF",Name(playerid),Name(targetid);
                   SendClientMessageToAll(-1,str);
                   SetPlayerPos(playerid,-2015.261108, 154.379516, 27.687500);
             }
        }
         else return SendClientMessage(playerid,-1,"You can't use this command");
}
Don't forget to download sscanf plugin and put it on plugins folder, then write it on server.cfg on plugins line.

P.S: Late.
Reply


Messages In This Thread
/sendto command help? - by Necip - 01.06.2013, 08:58
Re: /sendto command help? - by Stanford - 01.06.2013, 09:04
Re: /sendto command help? - by RenSoprano - 01.06.2013, 09:08
Re: /sendto command help? - by DeMoX - 01.06.2013, 09:12
Re: /sendto command help? - by Necip - 01.06.2013, 09:12
Re: /sendto command help? - by DeMoX - 01.06.2013, 09:14
Re: /sendto command help? - by RenSoprano - 01.06.2013, 09:15
Re: /sendto command help? - by Stanford - 01.06.2013, 09:17
Re: /sendto command help? - by Necip - 01.06.2013, 09:34

Forum Jump:


Users browsing this thread: 3 Guest(s)