[FilterScript] My first FilterScript! /Sos
#8

Use this to get players color then set it back on /saved.

pawn Код:
#include <a_samp>
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
new Color[MAX_PLAYERS];

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/sos", true) == 0) {
        new pName [MAX_PLAYER_NAME], string[128];
        Color[playerid]=GetPlayerColor(playerid);
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "%s has called a distress signal! There icon has turnend red, please save them!", pName);
        SendClientMessageToAll(COLOR_RED, string);
        SendClientMessage(playerid, COLOR_YELLOW, "Enter /saved when you have been rescued!");
        SetPlayerColor(playerid, 0xFF0000AA);
        return 1;
    }
    if(strcmp(cmdtext, "/saved", true) == 0) {
        new pName [MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "%s has been rescued! And no longer needs saving!", pName);
        SendClientMessageToAll(COLOR_YELLOW, string);
        SetPlayerColor(playerid, Color[playerid]);
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
/sos command (First Filterscript) - by Odyssey - 02.04.2011, 15:34
Re: My first FilterScript! /Sos - by [DOG]irinel1996 - 02.04.2011, 15:41
Re: My first FilterScript! /Sos - by Odyssey - 02.04.2011, 15:43
Re: My first FilterScript! /Sos - by Geso - 02.04.2011, 16:07
Re: My first FilterScript! /Sos - by Odyssey - 02.04.2011, 16:11
Re: My first FilterScript! /Sos - by Rokzlive - 02.04.2011, 16:59
Re: My first FilterScript! /Sos - by Jason010 - 02.04.2011, 17:06
Re: My first FilterScript! /Sos - by Rokzlive - 02.04.2011, 17:07
Re: My first FilterScript! /Sos - by Odyssey - 02.04.2011, 17:49
Re: My first FilterScript! /Sos - by Rokzlive - 02.04.2011, 17:57
Re: My first FilterScript! /Sos - by Odyssey - 02.04.2011, 18:03
Re: My first FilterScript! /Sos - by Odyssey - 02.04.2011, 20:34
Re: My first FilterScript! /Sos - by Odyssey - 30.06.2011, 13:49
Re : My first FilterScript! /Sos - by bousla7e - 30.06.2011, 19:46
Re: My first FilterScript! /Sos - by juraska - 30.06.2011, 20:45
Re: My first FilterScript! /Sos - by lolumadd_ - 01.07.2011, 02:20
Re: /sos Filterscript by TechKid100 - by Odyssey - 01.07.2011, 08:54

Forum Jump:


Users browsing this thread: 1 Guest(s)