07.02.2009, 18:37
1. Dont bump your thread
2. /m e command
OOC command
As all variables are 0 by default then OOC will be turned off automaticlly when your GM loads
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;
}
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;
}

