Problem(error/warning): Imam problem kad nesto igrac ukuca izbaci svima ono kako je po deafulta kako do popraviti??
Dio skripte: [ pawn ]//[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]//[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): //
Problem
1,118
1,118
pregleda
12
12
postova
Ova tema je zaključana. Samo moderatori i administratori mogu odgovarati.
pre 5 godina
PetarVG wrote on March 31, 2020, 10:15 pm:
Problem(error/warning): Imam problem kad nesto igrac ukuca izbaci svima ono kako je po deafulta kako do popraviti??
Dio skripte: [ pawn ]//[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]//[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): //
Dio skripte: [ pawn ]//[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]//[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): //
OnPlayerText.....
pre 5 godina
public OnPlayerText(playerid, text[]) {
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "Morate biti ulogovani!");
if(realchat) {
new tekst1 = strlen(text), string;
format(string, sizeof(string), "%s kaze: %s", GetName(playerid), text);
ProxDetector(20.0, playerid, string, BELA2,BELA2,BELA2,BELA2,BELA2);
return 0;
}
return 1;
}Naravno treba ti varijabla realchat, GetName i ProxDetector funkcija.
pre 5 godina
ShomyTKD wrote on April 1, 2020, 12:46 am:
public OnPlayerText(playerid, text[]) {
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "Morate biti ulogovani!");
if(realchat) {
new tekst1 = strlen(text), string;
format(string, sizeof(string), "%s kaze: %s", GetName(playerid), text);
ProxDetector(20.0, playerid, string, BELA2,BELA2,BELA2,BELA2,BELA2);
return 0;
}
return 1;
}Imam ovaj error
symbol is assigned a value that is never used: "tekst1"Naravno treba ti varijabla realchat, GetName i ProxDetector funkcija.
pre 5 godina
ShomyTKD wrote on April 1, 2020, 12:46 am:
public OnPlayerText(playerid, text[]) {
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "Morate biti ulogovani!");
if(realchat) {
new tekst1 = strlen(text), string;
format(string, sizeof(string), "%s kaze: %s", GetName(playerid), text);
ProxDetector(20.0, playerid, string, BELA2,BELA2,BELA2,BELA2,BELA2);
return 0;
}
return 1;
}Naravno treba ti varijabla realchat, GetName i ProxDetector funkcija.
public OnPlayerText(playerid, text[])
{
ProxDetector(playerid, 15.0, 0xFFFFFFAA, "(%d) %s: %s", playerid, GetName(playerid), text);
return 0;
}
stock ProxDetector(playerid, Float:max_range, color, const string[], GLOBAL_TAG_TYPES:...)
{
new
Float:pos_x,
Float:pos_y,
Float:pos_z,
Float:range,
Float:range_ratio,
Float:range_with_ratio,
clr_r, clr_g, clr_b,
Float:color_r, Float:color_g, Float:color_b;
if (!GetPlayerPos(playerid, pos_x, pos_y, pos_z))
{
return 0;
}
color_r = float(color >> 24 & 0xFF);
color_g = float(color >> 16 & 0xFF);
color_b = float(color >> 8 & 0xFF);
range_with_ratio = max_range * 1.6;
if(numargs() > 4)
{
new out;
va_format(out, 145, string, ___(4));
foreach (new i : Player)
{
if (!IsPlayerStreamedIn(i, playerid))
{
continue;
}
range = GetPlayerDistanceFromPoint(i, pos_x, pos_y, pos_z);
if (range > max_range)
{
continue;
}
range_ratio = (range_with_ratio - range) / range_with_ratio;
clr_r = floatround(range_ratio * color_r);
clr_g = floatround(range_ratio * color_g);
clr_b = floatround(range_ratio * color_b);
SendClientMessage(i, (color & 0xFF) | (clr_b << 8) | (clr_g << 16) | (clr_r << 24), out);
}
SendClientMessage(playerid, color, out);
}
else
{
foreach (new i : Player)
{
if (!IsPlayerStreamedIn(i, playerid))
{
continue;
}
range = GetPlayerDistanceFromPoint(i, pos_x, pos_y, pos_z);
if (range > max_range)
{
continue;
}
range_ratio = (range_with_ratio - range) / range_with_ratio;
clr_r = floatround(range_ratio * color_r);
clr_g = floatround(range_ratio * color_g);
clr_b = floatround(range_ratio * color_b);
SendClientMessage(i, (color & 0xFF) | (clr_b << 8) | (clr_g << 16) | (clr_r << 24), string);
}
SendClientMessage(playerid, color, string);
}
return 1;
}?
pre 5 godina
Emmett wrote on April 1, 2020, 11:16 pm:
public OnPlayerText(playerid, text[])
{
ProxDetector(playerid, 15.0, 0xFFFFFFAA, "(%d) %s: %s", playerid, GetName(playerid), text);
return 0;
}
stock ProxDetector(playerid, Float:max_range, color, const string[], GLOBAL_TAG_TYPES:...)
{
new
Float:pos_x,
Float:pos_y,
Float:pos_z,
Float:range,
Float:range_ratio,
Float:range_with_ratio,
clr_r, clr_g, clr_b,
Float:color_r, Float:color_g, Float:color_b;
if (!GetPlayerPos(playerid, pos_x, pos_y, pos_z))
{
return 0;
}
color_r = float(color >> 24 & 0xFF);
color_g = float(color >> 16 & 0xFF);
color_b = float(color >> 8 & 0xFF);
range_with_ratio = max_range * 1.6;
if(numargs() > 4)
{
new out;
va_format(out, 145, string, ___(4));
foreach (new i : Player)
{
if (!IsPlayerStreamedIn(i, playerid))
{
continue;
}
range = GetPlayerDistanceFromPoint(i, pos_x, pos_y, pos_z);
if (range > max_range)
{
continue;
}
range_ratio = (range_with_ratio - range) / range_with_ratio;
clr_r = floatround(range_ratio * color_r);
clr_g = floatround(range_ratio * color_g);
clr_b = floatround(range_ratio * color_b);
SendClientMessage(i, (color & 0xFF) | (clr_b << 8) | (clr_g << 16) | (clr_r << 24), out);
}
SendClientMessage(playerid, color, out);
}
else
{
foreach (new i : Player)
{
if (!IsPlayerStreamedIn(i, playerid))
{
continue;
}
range = GetPlayerDistanceFromPoint(i, pos_x, pos_y, pos_z);
if (range > max_range)
{
continue;
}
range_ratio = (range_with_ratio - range) / range_with_ratio;
clr_r = floatround(range_ratio * color_r);
clr_g = floatround(range_ratio * color_g);
clr_b = floatround(range_ratio * color_b);
SendClientMessage(i, (color & 0xFF) | (clr_b << 8) | (clr_g << 16) | (clr_r << 24), string);
}
SendClientMessage(playerid, color, string);
}
return 1;
}?
Imam prox detector ako ti pitas
pre 5 godina
PetarVG wrote on April 2, 2020, 7:52 am:
Ne imam ovaj error
symbol is assigned a value that is never used: "tekst1"To nije error, već samo warning, a skripta radi i kada imaš warning. Samo odradi ovo što ti je Vedran rekao i trebalo bi da radi 🙂
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava