/sos message?
#1

Im trying to make a sos
So someone types /sos [location]
and it sends a message to medicals, Showing there name, And what location they put down,
I know the sending to medicals, Its just to read what they put for location i wanna know,
Im using dcmd,
Reply
#2

Anyone?
Reply
#3

Nice illegal bump.

Just read in the string from the user input in dcmd command.
Then use that in the output to the medics.

If that doesn't make sense then post your dcmd and i will take a look.
Reply
#4

I havent got one, Im making it, But this is the main bit, So nothing of the command exists just yet
Reply
#5

Ok, well give it a try making it, and see how it goes (you can't ask people to code everything for you, unless you go to script request thread), then if you run into problems post.

Basically you can do a dcmd
dmcd_sos

then use sscanf to check for location
then send the message to all medics
Reply
#6

1. This topic isent for the whole code, Just the bit to check for location
2. I wouldnt be asking if i knew how to use sscanf
3. I have no clue what to do when using sscanf
Reply
#7

pawn Код:
dcmd_sos(playerid, params[])
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
    if(IsPlayerConnected(i))
    {
      if(GetPlayerTeam(i) == 0) // Change to the team ID of medic
      {
        format(string,sizeof(string),"[SOS] %s needs help at %s",PlayerName(playerid),params[6]);
        SendClientMessage(i,COLOR_RED,string);
        return 1;
      }
    }
  }
}
Something like this? Or do you want it to automatically output the players location if '/sos' is typed?
Reply
#8

Its so they type

/sos [location]

So if they typed jsuhufghsudfs
It wud send a message to medic saying: jsuhufghsudfs, xd, will tht code do tht
Reply
#9

Quote:
Originally Posted by Torran
Its so they type

/sos [location]

So if they typed jsuhufghsudfs
It wud send a message to medic saying: jsuhufghsudfs, xd, will tht code do tht
Go and try it ? we dont have to test things for you.

[Doppeyy
Reply
#10

Yes, that's how that code works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)