Problema
#1

Код:
	if(!strcmp(cmdtext,"/g", true,2))
	if(!strlen(cmdtext[2])) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /g(roove)");
 	if(gTeam[playerid] != TEAM_GROVE) return SendClientMessage(playerid, 0xAFAFAFAA, "You can't use this command !");
  new playername[MAX_PLAYER_NAME], string[128];
  GetPlayerName(playerid, playername, sizeof(playername));
	format(string, sizeof(string), "* *Groove [%s]: %s,", playername, cmdtext[2]);
 	for(new i = 0; i < MAX_PLAYERS; i++) {
 	}
	return 1;
}
ce e gresit?Cand intru in joc si vreau sa vorbesc pe team chat nu imi apare nimic
Reply
#2

pawn Код:
if(!strcmp(cmdtext,"/g", true,2))
    {
    if(!strlen(cmdtext[2])) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /g(roove)");
    if(gTeam[playerid] != TEAM_GROVE) return SendClientMessage(playerid, 0xAFAFAFAA, "You can't use this command !");
  new playername[MAX_PLAYER_NAME], string[128];
  GetPlayerName(playerid, playername, sizeof(playername));
    format(string, sizeof(string), "* *Groove [%s]: %s,", playername, cmdtext[2]);
    for(new i = 0; i < MAX_PLAYERS; i++) {
    }
    return 1;
}
Ai uitat sa pui {
dar e incompleta comanda,cred...
Reply
#3

se pare ca nu folosesti dcmd deci probabil, trebuie ceva de genul:

Код:
	if(strcmp(cmd, "/grove", true) == 0 || strcmp(cmd, "/g", true) == 0)
    {
 	if(gTeam[playerid] != TEAM_GROVE) return SendClientMessage(playerid, 0xAFAFAFAA, "You can't use this command !");
 				GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
  if(!strlen(result)) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /g(roove)");
  new playername[MAX_PLAYER_NAME], string[128];
  GetPlayerName(playerid, playername, sizeof(playername));
	format(string, sizeof(string), "* *Groove [%s]: %s,", playername, result);
 	for(new i = 0; i < MAX_PLAYERS; i++) {
 		if(gTeam[i] == TEAM_GROVE){
 		SendClientMessage(i, COLOR_YELLOW, string);
 		}
 	}
	return 1;
}
PS: n-am testat, dar ar trebui sa mearga
Reply
#4

pawn Код:
if( !strcmp(cmdtext,"/g", true,2))
{
    if(!strlen(cmdtext[2])) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /g [text]");
    if(gTeam[playerid] != TEAM_GROVE) return false;
    new playername[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, playername, sizeof(playername) );
    format(string, sizeof(string), " *TeamChat [%s]: %s", playername, cmdtext[2]);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
      if(gTeam[i] == TEAM_GROVE)
      {
        SendClientMessage(i, 0xAFAFAFAA, string);
      }
      return true;
    }
    return false;
}
________
Rock_Babe
Reply
#5

pawn Код:
if(!strcmp(cmdtext, #/g, true))
{
  if(!strlen(cmdtext[2])) return SendClientMessage(playerid, 0xAFAFAFAA, #USAGE: /g [text]);
  if(gTeam[playerid]!=TEAM_GROVE) return 0;
  new playername[20], string[128];
  GetPlayerName(playerid, playername, sizeof(playername));
  format(string, sizeof(string), # *TeamChat [%s]: %s, playername, cmdtext[2]);
  for(new i; i<GetMaxPlayers(); ++i) if(gTeam[i]==TEAM_GROVE) SendClientMessage(i, 0xAFAFAFAA, string);
  return 1;
}
The most short, the most quick(GetMaxPlayers), the most good.
Sorry, if i have spelling mistakes, I am from Israel.
Reply
#6

nu ai trecut MOD-ul pe 0.3R
Reply
#7

si ce e cu sobelitu ala?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)