24.10.2013, 22:02
Bom, Vim pedir ajuda de vocкs pois meu radar estб bugado, Eu crio um radar й ele fica invisivel gostaria que alguem mim ajuda-se nisso.
Jб mudei para uns 500 outros /criarradar й nгo funfou
Bom, Vim pedir ajuda de vocкs pois filterscript de VIP estб bugado, Eu dou VIP para um player mais nгo vai, gostaria que alguem mim ajuda-se nisso.
PHP код:
COMMAND:criarradar(playerid, params[])
{
new Float:x, Float:y, Float:z, Float:Angle, MaxSpeed, file[100], File:PFile, LineForFile[100], Msg[128];
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 5)
{
if (sscanf(params, "i", MaxSpeed)) SendClientMessage(playerid, 0xFF0000AA, "{FFFF00}[INFO] {009D4F}Use: /criarradar [60 Cidade, 90 Estrada, 120 Rodovia]");
else
{
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, Angle);
z = z - 1.0;
SetPlayerPos(playerid, x, y + 1.0, z + 1.0);
for (new CamID; CamID < MAX_CAMERAS; CamID++)
{
if (ACameras[CamID][CamSpeed] == 0)
{
SetupSpeedCamera(CamID, x, y, z, Angle, MaxSpeed);
format(file, sizeof(file), CameraFile, CamID);
PFile = fopen(file, io_write);
format(LineForFile, 100, "CamX %f\r\n", x);
fwrite(PFile, LineForFile);
format(LineForFile, 100, "CamY %f\r\n", y);
fwrite(PFile, LineForFile);
format(LineForFile, 100, "CamZ %f\r\n", z);
fwrite(PFile, LineForFile);
format(LineForFile, 100, "CamAngle %f\r\n", Angle);
fwrite(PFile, LineForFile);
format(LineForFile, 100, "CamSpeed %i\r\n", MaxSpeed);
fwrite(PFile, LineForFile);
fclose(PFile);
format(Msg, 128, "{FFFF00}[INFO] {009D4F}Vocк criou o radar ID: %i", CamID);
SendClientMessage(playerid, 0x00FF00FF, Msg);
return 1;
}
}
// In case all camera-slots are occupied (100 camera's have been created already), let the player know about it
format(Msg, 128, "{FFFF00}[INFO] {009D4F}Vocк nгo pode criar mais de %i radares.", MAX_CAMERAS);
SendClientMessage(playerid, 0xFFFFFFFF, Msg);
}
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
Bom, Vim pedir ajuda de vocкs pois filterscript de VIP estб bugado, Eu dou VIP para um player mais nгo vai, gostaria que alguem mim ajuda-se nisso.
PHP код:
/* Include's */
#include <a_samp>
#include <zcmd>
#include <sscanf>
#include <DOF2>
/* New's */
new PlayerVip[MAX_PLAYERS];
/* Public's */
main(){}
public OnFilterScriptInit() return 1;
public OnFilterScriptExit() { DOF2_Exit(); return 1; }
public OnPlayerConnect(playerid)
{
new string[80];
format(string, sizeof(string), "/vips/%s.ini", GetName(playerid));
if(DOF2_FileExists(string))
{
PlayerVip[playerid] = DOF2_GetInt(string,"VipExpira");
if(gettime() > PlayerVip[playerid])
{
DOF2_RemoveFile(string);
PlayerVip[playerid] = 0;
SendClientMessage(playerid, -1, "{A62CF2}VIP{FFFF00} Seu vip expirou!");
}
else
{
format(string, sizeof(string), "{A62CF2}VIP{FFFF00} Seu vip expira em %s.", convertNumber(PlayerVip[playerid]-gettime()));
SendClientMessage(playerid, -1, string);
}
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(PlayerVip[playerid] > 0)
{
if(gettime() > PlayerVip[playerid])
{
new string[40];
format(string, sizeof(string), "/vips/%s.ini", GetName(playerid));
DOF2_RemoveFile(string);
PlayerVip[playerid] = 0;
SendClientMessage(playerid, -1, "{A62CF2}VIP{FFFF00} Seu vip expirou!");
}
else
{
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
}
}
return 1;
}
/* Stock's */
stock ConvertDays(dias)
{
new
valueday = 86400*dias,
daysconvert,
gtime = gettime()
;
#emit LOAD.S.PRI gtime
#emit LOAD.S.ALT valueday
#emit ADD
#emit STOR.S.PRI daysconvert
return daysconvert;
}
stock convertNumber(n)
{
new dia, hr, mn, seg, resto;
resto = n;
seg = resto % 60;
resto /= 60;
mn = resto % 60;
resto /= 60;
hr = resto % 24;
resto /= 24;
dia = resto;
new str[50];
format(str, sizeof(str), "%ddias, %02dh %02dm %02ds", dia, hr, mn, seg);
return str;
}
stock GetName(playerid)
{
new name[24];
GetPlayerName(playerid, name, sizeof(name));
return name;
}
/* Command's */
CMD:vips(playerid)
{
new string[85];
new count;
SendClientMessage(playerid, -1, "{A62CF2}VIP{FFFF00} Jogadores VIP's Online:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerVip[i] > 0)
{
if(IsPlayerConnected(i))
{
format(string, sizeof(string), "Vip %s (%d) [%s]", GetName(i), i, convertNumber(PlayerVip[i]-gettime()));
SendClientMessage(playerid, 0xE3E3E3FF, string);
count++;
}
}
}
if(count == 0)
return SendClientMessage(playerid, -1, "{A62CF2}VIP{FFFF00} Nгo tem nenhum jogador vip on-line!");
return true;
}
CMD:darvip(playerid, params[])
{
new id, days, string[70];
if(!IsPlayerAdmin(playerid))
return SendClientMessage(playerid, -1, "{A62CF2}VIP{FFFF00} Vocк precisa estar logado na RCON para usar este comando!");
if(sscanf(params, "ud", id, days))
return SendClientMessage(playerid, -1, "{FFFF00}[INFO]{009D4F} /darvip [ID] [Dias]");
if(days < 0)
{
return SendClientMessage(playerid, -1, "{A62CF2}VIP{FFFF00} Este jogador nгo estб online!");
}
else
{
if(!IsPlayerConnected(id))
return SendClientMessage(playerid, -1, "{A62CF2}VIP{FFFF00} Este jogador nгo estб online!");
else
{
PlayerVip[id] = ConvertDays(days);
format(string, sizeof(string), "{A62CF2}VIP{FFFF00} Vocк deu %d dias de VIP para %s.", days, GetName(id));
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "{A62CF2}VIP{FFFF00} Vocк recebeu %d dias de VIP.", days);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "/vips/%s.ini", GetName(id));
DOF2_CreateFile(string);
DOF2_SetInt(string,"VipExpira", PlayerVip[id]);
DOF2_SaveFile();
}
}
return true;
}