Need help with 2 things
#9

1. Dont bump your thread
2. /m e command
pawn Code:
if(!strcmp(cmdtext, "/me", true, 3))
    {
    if(cmdtext[3] == 0) {
      SendClientMessage(playerid, COLOR_YELLOW, "BRUK: /me tekst");
      return 1;
    }
    new str[128], Float:Pos[3];
    GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
        GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
        for(new i = 0; i < MAX_PLAYERS; i++){
        if(PlayerToPoint(40.0, i, Pos[0], Pos[1], Pos[2])){
    SendClientMessage(COLOR_YELLOW, str);
        }
        }

        return 1;
 }
OOC command
pawn Code:
// top of script
new OOC;
// main command
if( !strcmp("/o", cmdtext, true, 2) )
    {
    new str[256], pname[256];
        if(OOC == 0)
        {
            SendClientMessageToAll(COLOR_WHITE, "OOC kannalen er av!");
        }
        else
        {
            GetPlayerName(playerid, pname, 256);
            format(str, 256, "OOC %s sier: (( %s ))", pname, cmdtext[3]);
            SendClientMessageToAll(COLOR_WHITE, str);
        }
        return 1;
    }
// toggle ooc
if( !strcmp("/togooc", cmdtext, true, 7) )
{
if(OOC == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "OOC turned on");
OOC = 1;
}
else if(OOC == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "OOC turned off");
OOC = 0;
}
return 1;
}
As all variables are 0 by default then OOC will be turned off automaticlly when your GM loads
Reply


Messages In This Thread
Need help with 2 things - by Danand - 07.02.2009, 11:22
Re: Need help with 2 things - by Mikep - 07.02.2009, 11:59
Re: Need help with 2 things - by Danand - 07.02.2009, 12:05
Re: Need help with 2 things - by Mikep - 07.02.2009, 12:14
Re: Need help with 2 things - by Danand - 07.02.2009, 12:20
Re: Need help with 2 things - by Nero_3D - 07.02.2009, 12:26
Re: Need help with 2 things - by Danand - 07.02.2009, 13:29
Re: Need help with 2 things - by Danand - 07.02.2009, 18:31
Re: Need help with 2 things - by ICECOLDKILLAK8 - 07.02.2009, 18:37
Re: Need help with 2 things - by Jokerr_mayne - 01.05.2009, 21:51

Forum Jump:


Users browsing this thread: 1 Guest(s)