02.04.2011, 13:56
Eu peguei um GM que tinha uns radares, mas quando eu compilo da os seguintes erros:
Linhas de comando com erro:
Ao pesquisar sobre "radar" no GM aparece isso:
pawn Код:
D:\samp03csvr_win32\samp03csvr_win32\gamemodes\BRL.pwn(2534) : error 017: undefined symbol "IsPlayerInCircle"
D:\samp03csvr_win32\samp03csvr_win32\gamemodes\BRL.pwn(2519) : warning 203: symbol is never used: "radius"
pawn Код:
stock AddFlitsPaal(playerid, modelid, Float:xx, Float:yy, Float:zz, radius, speed)// LINHA 2519
{
new fine[MAX_PLAYERS];
new str[256];
new str2[256];
new newcar = GetVehicleModel(GetPlayerVehicleID(playerid));
if(objectcreated!=maxobject)
{
CreateDynamicObject(modelid, xx, yy, zz-20, 0.0, 0.0, 10);
objectcreated++;
Create3DTextLabel("Radar !!\n 100 KM/H ", COLOR_YELLOW, xx, yy, zz+1, 50, 0, 1);
}
if((distance1[playerid]) > speed)
{
if(IsPlayerInCircle(playerid, xx, yy, radius) && GetPlayerState(playerid)== PLAYER_STATE_DRIVER)//LINHA 2534
{
if(!IsABicicleta(newcar))
{
if(!IsACop(playerid))
{
if(!IsAPlane(newcar))
{
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
fine[playerid] = ((distance1[playerid]*17/10)-speed);
PlayerPlaySound(playerid, 1132, 0.0, 0.0, 0.0);
format(str2, 256, "HQ - Todas as unidade APB: Relato: Desconhecido");
SendTeamMessage(14, COLOR_RED, str2);
format(str2, 256, "HQ - Crime: Excesso de Velocidade, Suspeito: %s",sendername);
SendTeamMessage(14, COLOR_RED, str2);
format(str,sizeof(str), "[BRL] Vocк ultrapassou o limite de velocidade de 100 KM/H. Vocк foi flagrado а %d KM/H.",speed*2, distance1[playerid]*2,fine[playerid]);
SendClientMessage(playerid, COLOR_RED, str);
Multa[playerid] += 1;
SendClientMessage(playerid, COLOR_RED, "[BRL]Vб atй o balcгo da DP e digite /pagarmulta.");
}
}
}
}
}
}
pawn Код:
new Multa[MAX_PLAYERS];
new UpdateSeconds2 = 2; // Nгo Mecher
new maxobject = 20; //radar
new objectcreated; //radar
new distance1[MAX_PLAYERS];
pawn Код:
public UpdateSpeed(playerid)
{
new Float:x,Float:y,Float:z;
new Float:distance,value;
for(new i=0; i < SLOTS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i, x, y, z);
distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePlayerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
value = floatround(distance * 3600);
if(UpdateSeconds > 1)
{
value = floatround(value / UpdateSeconds);
}
distance1[i] = floatround(value/1600);
SavePlayerPos[i][LastX] = x;
SavePlayerPos[i][LastY] = y;
SavePlayerPos[i][LastZ] = z;
// Para colocar Coordenada no lugar que voce quer , basta colocar a Coordenada X,Y,Z no lugar dos 00000 ,
//o 40 й o radio , que o radar pega, e o 50 , й a velocidade maxima*//*
AddFlitsPaal(i, 9583, 1350.1162,-1297.5933,15.6389, 30, 60); // VAGO
AddFlitsPaal(i, 9583, 862.7428,-1400.4935,13.0453, 30, 60); // VAGO
AddFlitsPaal(i, 9583, 527.7668,-1722.8721,12.0848, 30, 60); // VAGO
AddFlitsPaal(i, 9583, 1200.9847,-1337.9875,13.3984, 30, 60); // VAGO
AddFlitsPaal(i, 9583, 632.3535,-1503.4446,14.7447, 30, 60); // VAGO
AddFlitsPaal(i, 9583, 1590.0818,-974.7191,38.3613, 30, 60); // VAGO
AddFlitsPaal(i, 9583, 1646.2874,-1738.0092,13.5469, 30, 60); // VAGO
AddFlitsPaal(i, 9583, 2025.8516,-1746.5704,13.5469, 30, 60); // VAGO
AddFlitsPaal(i, 9583, 2118.0085,-1649.8198,16.9618, 30, 60); // VAGO
AddFlitsPaal(i, 9583, 2343.8149,-1737.7186,13.5469, 30, 60); // VAGO
}
}
}