How to remove /g global chat from my GM
#1

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
Reply
#2

Wrap [pawn] around your code
Reply
#3

You obviously messed something up. Show us the OnPlayerText callback.
Reply
#4

Here is the pwn file so maybe you can look at the code.

COD5.pwn

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)