13.04.2007, 08:31
Automatic 1337 speak:
Global Declarations:
OnPlayerConnect:
OnPlayerText:
OnPlayerCommandText:
DCMD leet command:
Requires:
StrToHacker
Can be found in the Useful Functions thread
Credit to Ramjet for the idea
Global Declarations:
pawn Код:
new bool:leet[MAX_PLAYERS];
pawn Код:
public OnPlayerConnect(playerid){
leet[playerid] = false;
}
pawn Код:
public OnPlayerText(playerid,text[]){
if(leet[playerid]) format(text,MAX_STRING,"%s",StrToHacker(text));
return 1;
}
pawn Код:
public OnPlayerCommandText(playerid,cmdtext[]){
dcmd(leet,4,cmdtext);
return 0;
}
pawn Код:
dcmd_leet(playerid,params[]){
if(!strlen(params)){
SendClientMessage(playerid,COLOR_WHITE,"USAGE: /leet [on/off]");
return 1;
}
if(strcmp(params,"on",true) == 0){
SendClientMessage(playerid,COLOR_RED,"13375P34K Turned On");
leet[playerid] = true;
return 1;
}
if(strcmp(params,"off",true) == 0){
SendClientMessage(playerid,COLOR_RED,"13375P34K Turned Off");
leet[playerid] = false;
return 1;
}
SendClientMessage(playerid,COLOR_WHITE,"USAGE: /leet [on/off]");
return 1;
}
StrToHacker
Can be found in the Useful Functions thread
Credit to Ramjet for the idea