A few things ...
#2

(1) In sscanf, you have to specify a size of the string. Like this:
pawn Код:
sscanf(params, "s[24]", string
or whatever you are splitting it into.

(2 & 3) You need to make a loop that searches through all players before sending the message. I'll throw an example together real quick

pawn Код:
if (strcmp("/help", cmdtext, true) == 0)
    {
        if (gTeam[playerid] == POLICE || gTeam[playerid] == TERRORIST)
        {
            new Helpmsg[100], Name[MAX_PLAYER_NAME], Float:x, Float:y, Float:z;
            GetPlayerPos(playerid, x, y, z);
            GetPlayerName(playerid, Name, sizeof(Name));
            format(Helpmsg, sizeof(Helpmsg), "%s (%i) needs help! You can find him on the map!", Name, playerid);
            for(new i=0; i<MAX_PLAYERS;i++)
            {
                     if(gTeam[i] == MEDIC)
                     {
                              SendClientMessage(i, COLOR_RED, Helpmsg);
                              SetPlayerCheckpoint(i, x, y, z, 5.0);
                      }
             }
        }
        else
        {
            SendClientMessage(playerid,COLOR_RED, "You are not a cop or a terrorist so you can't use this cmd !");
        }
        return 1;
    }
Same basic idea for #3
Reply


Messages In This Thread
A few things ... - by Michael@Belgium - 03.02.2011, 19:59
Re: A few things ... - by randomkid88 - 03.02.2011, 20:11
Re: A few things ... - by sekol - 03.02.2011, 20:13
Re: A few things ... - by [L3th4l] - 03.02.2011, 20:14
Re: A few things ... - by Hal - 03.02.2011, 20:18
Re: A few things ... - by Michael@Belgium - 03.02.2011, 20:33
Re: A few things ... - by Michael@Belgium - 04.02.2011, 16:23
Re: A few things ... - by MrDeath537 - 04.02.2011, 17:34

Forum Jump:


Users browsing this thread: 4 Guest(s)