Phone commands.
#5

pawn Код:
if(strcmp("/call",cmdtext, true, 10) == 0)
{
     new 2ndpara[128];
     new idx;
     2ndpara = strtok(cmdtext, idx);
   
     if(strcmp(2ndpara,"911",true) == 0)
    {
      SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
      SendClientMessage(playerid,COLOR_DBLUE,"[911 Dispatch]: You have call 911, we are sending help now.");
      SendSFPDMessage(COLOR_GREEN,"[911 Dispatch]: Someone has called for help, we set a checkpoint to their location.");
    }
     return 1;
}
pawn Код:
stock SendSFPDMessage(color, string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i)) {
            if(gTeam[i] == /*yourSFPDnumber*/){
                SendClientMessage(i, color, string);
            }
        }
    }
}
UNTESTED
Reply


Messages In This Thread
Phone commands. - by Steven82 - 04.04.2010, 19:30
Re: Phone commands. - by Last_Stand_Guardian - 04.04.2010, 19:34
Re: Phone commands. - by Steven82 - 04.04.2010, 19:36
Re: Phone commands. - by Last_Stand_Guardian - 04.04.2010, 19:43
Re: Phone commands. - by westre - 04.04.2010, 19:55
Re: Phone commands. - by Steven82 - 05.04.2010, 02:07

Forum Jump:


Users browsing this thread: 1 Guest(s)