How to remove /g global chat from my GM -
Hittop65 - 04.02.2013
My question is how can i remove /g the global chat function from my GM?
I removed these lines listed below and my GM compiled perfectly but when players type regular text in the counsel nothing comes up OMG.
if(strcmp(cmd, "/global", true) == 0 || strcmp(cmd, "/g", true) == 0) {
for(new i=0; i<256; i++) {
if( i>=3) {
if( strfind(cmdtext[i], "hack", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
if( strfind(cmdtext[i], "hacks", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
if( strfind(cmdtext[i], "hacker", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
if( strfind(cmdtext[i], "hackz", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
if( strfind(cmdtext[i], "hax", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
}
}
if( gTeam[playerid] == TEAM_JAPAN ) {
GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
printf("Global Chat: %s: %s", nameee, cmdtext[3]);
}
if( gTeam[playerid] == TEAM_RUSSIA ) {
GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
printf("Global Chat: %s: %s", nameee, cmdtext[3]);
}
if( gTeam[playerid] == TEAM_TALIBAN ) {
GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
printf("Global Chat: %s: %s", nameee, cmdtext[3]);
}
if( gTeam[playerid] == TEAM_USA ) {
GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
printf("Global Chat: %s: %s", nameee, cmdtext[3]);
}
if( gTeam[playerid] == TEAM_GERMANY ) {
GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
printf("Global Chat: %s: %s", nameee, cmdtext[3]);
}
return 1;
}
I downloaded my GM from here:
http://forum.sa-mp.com/showthread.ph...ight=Call+Duty
I also tried reaching the author of this GM but I didn't receive any help Someone here in the SAMP community please help me with this.
Thanks....
global cmd.jpg
Re: How to remove /g global chat from my GM -
Noles2197 - 04.02.2013
Wrap [pawn] around your code
Re: How to remove /g global chat from my GM -
Scenario - 04.02.2013
You obviously messed something up. Show us the OnPlayerText callback.
Re: How to remove /g global chat from my GM -
Hittop65 - 04.02.2013
Here is the pwn file so maybe you can look at the code.
COD5.pwn
Thanks.