05.02.2012, 01:49
do radar ai
pawn Код:
stock AddFlitsPaal(playerid, modelid, Float:xx, Float:yy, Float:zz, radius, speed)
{
new fine[MAX_PLAYERS];
new str[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)
{
if(!IsACop(playerid))
{
if(!IsAPlane(newcar))
{
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
fine[playerid]=((distance1[playerid]*17/10)-speed);
format(str,sizeof(str), "[Radar] O limite de velocidade й %d KM/H. Vocк foi flagrado а %d KM/H e foi multado!",speed*2, distance1[playerid]*2,fine[playerid]);
SendClientMessage(playerid, VERDEFRACO, str);
multa[playerid] += 1;
PlayerPlaySound(playerid, 1132, 0.0, 0.0, 0.0);
SendClientMessage(playerid, VERDEFRACO, "[Radar] Para pagar a multa, vб atй o balcгo da DP e digite /pagarmulta.");
}
}
}
}
}