29/09/2020 11:38
Proxdetector:
Getname:
Cores:
Comandos roleplay:
Comando /pagar da net :v
Código PHP:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz <radi/16) && (tempposz > -radi/16)))
{
SendClientMessage(i, col1, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
{
SendClientMessage(i, col2, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SendClientMessage(i, col3, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SendClientMessage(i, col4, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, col5, string);
}
}
else
{
SendClientMessage(i, col1, string);
}
}
}
return 1;
}
Getname:
Código PHP:
stock GetName(playerid)
{
new
name[24];
GetPlayerName(playerid, name, sizeof(name));
strreplace(name, '_', ' ');
return name;
}
stock strreplace(string[], find, replace)
{
for(new i=0; string[i]; i++)
{
if(string[i] == find)
{
string[i] = replace;
}
}
}
Cores:
Código PHP:
#define COR_ME 0xC2A2DAFF
#define COR_B 0xAFAFAFFF
#define AMARELO 0xFFF01FFF
#define COR_PM 0xF7F62CFF
#define VERDE_ESCURO 0x018217FF
#define COR_ANUNCIO 0x3CA03EFF
#define VERMELHO 0xFF4A4AFF
#define AZUL 0x3C4EEFF
#define ROXO 0x333399FF
#define COR_PELE 0xFFBF70FF
#define COLOR_BITEM 0xE1B0B0FF
#define COLOR_GRAD1 0xB4B5B7FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD3 0xCBCCCEFF
#define COLOR_GRAD4 0xD8D8D8FF
#define COLOR_GRAD5 0xE3E3E3FF
#define COLOR_GRAD6 0xF0F0F0FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xFF4A4AFF
#define COLOR_BLACK 0x000001FF
#define COLOR_BLUE 0x007BD0FF
#define COLOR_LIGHTORANGE 0xFFA100FF
#define COLOR_FLASH 0xFF000080
#define COLOR_LIGHTRED 0xFF6347AA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_LIGHTGREEN 0x9ACD32AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_LIGHTYELLOW 0xFFFF91FF
#define COLOR_YELLOW2 0xF5DEB3AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_FADE1 0xE6E6E6E6
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_DBLUE 0x2641FEAA
#define COLOR_DOC 0xFF8282AA
#define COLOR_DCHAT 0xF0CC00FF
#define COLOR_NEWS 0xFFA500AA
#define COLOR_OOC 0xE0FFFFAA
#define TEAM_BLUE_COLOR 0x8D8DFF00
#define TEAM_GROVE_COLOR 0x00AA00FF
#define TEAM_AZTECAS_COLOR 0x01FCFFC8
#define NEWBIE_COLOR 0x7DAEFFFF
#define SAMP_COLOR 0xAAC4E5FF
#define EMBED_GREEN "{1EFF00}"
#define EMBED_RED "{FF0000}"
#define EMBED_WHITE "{FFFFFF}"
#define EMBED_LIGHT_GREEN "{50FF50}"
#define EMBED_LIGHT_RED "{FF5050}"
Comandos roleplay:
Código PHP:
CMD:me(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, VERMELHO, "{FF4A4A}USE:{FFFFFF} /me [acao] de forma certa!");
new string[128];
format(string, sizeof(string), "* %s %s", GetName(playerid), params);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
Comando /pagar da net :v
Código PHP:
CMD:pagar(playerid, params[])
{
new id, quantia, string[256], quemdeu[MAX_PLAYER_NAME], quemganhou[MAX_PLAYER_NAME];
if(sscanf(params,"ii",id,quantia)) return SendClientMessage(playerid, -1, "USE: /pagar [ID [QUANTIA]");
GetPlayerName(id, quemganhou, sizeof(quemganhou));
GetPlayerName(playerid, quemdeu, sizeof(quemdeu));
GivePlayerMoney(id, quantia);
GivePlayerMoney(playerid, -quantia);
format(string, sizeof(string), "Vocк Pagou R$ %d para %s(ID: %d)", quantia, quemganhou, id);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), "Vocк Ganhou R$ %d de %s(Jogador: %d).", quantia, quemdeu, playerid);
SendClientMessage(id, COLOR_GRAD1, string);
return 1;
}
Código PHP:
CMD:ame(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, VERMELHO, "{FF4A4A}USE:{FFFFFF} /ame [acao] de forma certa!");
new string[128];
format(string, sizeof(string), "> %s %s", GetName(playerid), params);
SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 20.0, 3000);
format(string, sizeof(string), "> %s %s", GetName(playerid), params);
SendClientMessage(playerid, COLOR_PURPLE, string);
return 1;
}
Código PHP:
CMD:baixo(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, VERMELHO, "{FF4A4A}USE:{FFFFFF} /baixo [acao] de forma certa!");
new string[128];
format(string, sizeof(string), "[baixo] %s diz %s", GetName(playerid), params);
ProxDetector(5.0, playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3 ,COLOR_FADE4, COLOR_FADE5);
format(string, sizeof(string), "[baixo] %s", params);
SetPlayerChatBubble(playerid, string, COLOR_WHITE, 5.0, 5000);
return 1;
}
Código PHP:
CMD:gritar(playerid,params[])
{
new string[128];
if(isnull(params)) return SendClientMessage(playerid, VERMELHO,"{FF4A4A}USE:{FFFFFF} /gritar [grito] de forma certa!");
format(string, sizeof(string), "%s grita: %s!", GetName(playerid), params);
ProxDetector(30.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_FADE1,COLOR_FADE2);
return 1;
}
Código PHP:
CMD:ado(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, VERMELHO, "{FF4A4A}USE:{FFFFFF} /do [ambiente] de forma certa!");
new string[128];
format(string, sizeof(string), "> %s (( %s ))", params, GetName(playerid));
SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 20.0, 3000);
format(string, sizeof(string), "> %s (( %s ))", params, GetName(playerid));
SendClientMessage(playerid, COLOR_PURPLE, string);
return 1;
}
Código PHP:
CMD:do(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, VERMELHO, "{FF4A4A}USE:{FFFFFF} /do [ambiente] de forma certa!");
new string[128];
format(string, sizeof(string), "* %s (( %s ))", params, GetName(playerid));
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
Código PHP:
CMD:b(playerid, params[])
{
new text[128], string[128];
if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, VERMELHO, "{FF4A4A}USE:{FFFFFF} /b [descrever] de forma certa!");
format(string, sizeof(string), "(( [%d] %s: %s ))", playerid, GetName(playerid), text);
ProxMessage(playerid, 15.0, 0xB3B3B3FF, string);
return 1;
}
Código PHP:
CMD:pm(playerid, params[])
{
new str[128], text[128], targetid;
if(sscanf(params, "us[128]", targetid, text)) return SendClientMessage(playerid, VERMELHO, "{FF4A4A}USE:{FFFFFF} /pm [player] [texto] de forma certa!");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, VERMELHO, "{018217}SERVER:{FFFFFF} O jogador nao esta conectado!");
format(str, sizeof(str), "PM para %s (%d): %s", GetName(targetid), targetid, text);
SendClientMessage(playerid, 0xE0E800FF, str);
format(str, sizeof(str), "PM de %s (%d): %s", GetName(playerid), playerid, text);
SendClientMessage(targetid, 0xE8C900FF, str);
return 1;
}