Message reservation help....
#1

pawn Код:
CMD:911(playerid,params[])
{
//911 system
        if(isnull(params)) return SendClientMessage(playerid,-1,"Usage: /911 [Message and Location]");
        new name[24],msg[128];
        new sendername[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        GetPlayerName(playerid,name,24);
        new playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playername, sizeof(playername));
        format(string, sizeof(string), "-------------------------------------------------------------------------------------------------", sendername, params);
        SendClientMessageToAll(COLOR_GREY, string);
        format(string, sizeof(string), "DISPATCH", sendername, params);
        SendClientMessageToAll(COLOR_ROYALBLUE, string);
        format(string, sizeof(string), "Be advised, the following is a 911 call.", sendername, params);
        SendClientMessageToAll(COLOR_GREY, string);
        format(string, sizeof(string), "Units aviable please respond.", sendername, params);
        SendClientMessageToAll(COLOR_GREY, string);
        format(string, sizeof(string), "CALLER: %s  ~  INFO & LOCATION: %s", sendername, params);
        SendClientMessageToAll(COLOR_GREY, string);
        format(string, sizeof(string), "-------------------------------------------------------------------------------------------------", sendername, params);
        SendClientMessageToAll(COLOR_GREY, string);
        for(new i=0;i<MAX_PLAYERS;i++)
        if(GetPlayerSkin(i) == 285 || GetPlayerSkin(playerid) == 282 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 283 || GetPlayerSkin(playerid) == 288 ||GetPlayerSkin(playerid) == 278  || GetPlayerSkin(playerid) == 275 || GetPlayerSkin(playerid) == 279 || GetPlayerSkin(playerid) == 277 || GetPlayerSkin(playerid) == 274 || GetPlayerSkin(playerid) == 276) SendClientMessage(i, COLOR_GREY, msg);
        return 1;
}
How i can send the message JUST to the skins who are in the last line but let type to all the command? and how i can give a message when someone has send the message like "You called the 911"

+REP!
Reply
#2

As you requested in PM, I made it and sent you. You both still need to learn to use loop and format. You don't have to format message if it's clear message like 'Be advised, the following is a 911 call.'
Reply
#3

Quote:

Been scripting in SA-MP for nearly 4 years.

That's a lie
Reply
#4

sorry I thought you meant you'd been scripting for samp for 4 years.
You just meant the first time you scripted in pawno was 4 years ago
Reply
#5

Tidied up: Untested
pawn Код:
CMD:911(playerid,params[])
{
        //911 system
        if(isnull(params) || strlen(params) < 3) return SendClientMessage(playerid,-1,"Usage: /911 [Message] [Location]]");
        new showreport[256];
        new Message[128];
        new Location[128];
        new sendername[MAX_PLAYER_NAME];
        sscanf(params, "s[128]s[128]", Message, Location);
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(showreport, sizeof(showreport), "Your Report: %s @ Location: %s.", Message, Location);
        SendClientMessage(playerid, COLOR_GREY, "You just called 911.");
        SendClientMessage(playerid, COLOR_GREY, showreport);

        for(new i=0;i<MAX_PLAYERS;i++)
        {
            if(GetPlayerSkin(i) == 285 || GetPlayerSkin(i) == 282 || GetPlayerSkin(i) == 281 || GetPlayerSkin(i) == 283 || GetPlayerSkin(i) == 288 ||GetPlayerSkin(i) == 278  || GetPlayerSkin(i) == 275 || GetPlayerSkin(i) == 279 || GetPlayerSkin(i) == 277 || GetPlayerSkin(i) == 274 || GetPlayerSkin(i) == 276)
            {
                SendClientMessage{i, COLOR_GREY, "-------------------------------------------------------------------------------------------------");
                SendClientMessage(i, COLOR_GREY, "DISPATCH");
                SendClientMessage(i, COLOR_GREY, "Be advised, the following is a 911 call.");
                SendClientMessage(i, COLOR_GREY, "Units aviable please respond.");
                format(string, sizeof(string), "CALLER: %s  ~  INFO: %s LOCATION: %s", sendername, Message, Location);
                SendClientMessage{i, COLOR_GREY, "-------------------------------------------------------------------------------------------------");
            }
        }
        return 1;
}
Reply
#6

You script pawn[language] in pawno[compiler].
Reply
#7

Quote:
Originally Posted by Berlovan
Посмотреть сообщение
You script pawn[language] in pawno[compiler].
It's correct to say I script pawn
It's also correct to say I script IN pawn.

What a useless post
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)