im searching a filterscript so if i do /accent mexican
/s Hello Vagos Playername [Mexican accent]: Hello Vagos but i can't findt it :S |
COMMAND:mexican(playerid, params[])
{
new string[164];
if(sscanf(params, "s[128]", string))
{
SendClientMessage(playerid, -1, "ERROR: Usage /mexican [message]");
return 1;
}
else
{
format(string, sizeof(string), "(Mexican Accent) %s: %s :)", GetPlayerName(playerid), string);
SendClientMessageToAll(GetPlayerColor(playerid), string);
}
return 1;
}
CMD:accent(playerid,params[])
{
new accent;
if(sscanf(params,"i",accent))
{
SendClientMessage(playerid,COLOR_LIGHTGRAY,"USAGE: /accent [number]");
SendClientMessage(playerid,COLOR_LIGHTGRAY,"1:[American] 2:[Mexican] 3:[Russian]");
return 1;
}
if(accent > 3 || accent < 1)
{
SendClientMessage(playerid,COLOR_LIGHTGRAY,"Invalid number.");
return 1;
}
else
{
pInfo[playerid][pAccent] = accent;
if(accent == 1) return SendClientMessage(playerid,COLOR_WHITE,"You have switched to an American accent.");
else if(accent == 2) return SendClientMessage(playerid,COLOR_WHITE,"You have switched to a Mexican accent.");
else if(accent == 3) return SendClientMessage(playerid,COLOR_WHITE,"You have switched to a Russian accent.");
return 1;
}
}
public OnPlayerText(playerid, text[])
{
new pname[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, pname, sizeof(pname));
strreplace(pname,'_',' ');
switch(pInfo[playerid][pAccent])
{
case 0:format(str, sizeof(str), "%s says: %s", pname, text);
case 1:format(str, sizeof(str), "[American Accent] %s says: %s", pname, text);
case 2:format(str, sizeof(str), "[Mexican Accent] %s says: %s", pname, text);
case 3:format(str, sizeof(str), "[Russian Accent] %s says: %s", pname, text);
}
ProxDetector(30.0, playerid, str, COLOR_WHITE);
return 0;
}
stock ProxDetector(Float:radi, playerid, string[],color)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
for(new player;player<MAX_PLAYERS;player++)
{
if(!IsPlayerConnected(playerid))continue;
if(IsPlayerInRangeOfPoint(player,radi,x,y,z)) SendClientMessage(player,color,string);
}
}
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Accents commands, made by FalconX loaded");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
print("\n--------------------------------------");
print("Accents commands, made by FalconX unloaded");
print("--------------------------------------\n");
return 1;
}
#else
main()
{
print("\n----------------------------------");
print("Accents commands, made by FalconX");
print("----------------------------------\n");
}
#endif
COMMAND:mexican(playerid, params[])
{
new string[164];
if(sscanf(params, "s[128]", string))
{
SendClientMessage(playerid, -1, "ERROR: Usage /mexican [message]");
return 1;
}
else
{
format(string, sizeof(string), "(Mexican Accent) %s: %s", GetName(playerid), string);
SendClientMessageToAll(GetPlayerColor(playerid), string);
}
return 1;
}
// you can copy the above code as many times as you want and can make more accents.
stock GetName(playerid)
{
new name[24];
GetPlayerName(playerid, name, 24);
return name;
}
It's alright mate, I made a filterscript for you. You can put this in PAWNO and paste this and compile it will work.
pawn Код:
-FalconX |
This means they have to type /mexican to speak in that accent. Kinda lame :\ Look at mine. It works like it would a RP server.
|
im searching a filterscript so if i do /accent mexican
/s Hello Vagos Playername [Mexican accent]: Hello Vagos but i can't findt it :S |
Ofcourse it does. I don't care what you made, I tried to help him. He must be more clear if he wanted such a system. And yes I don't really care
![]() @Frank, I guess what I made helped you ![]() -FalconX |