[HELP]Speed Camera Code
#6

This probably won't work but try it,

pawn Код:
stock AddSpeedCamera(playerid, modelid, Float:xx, Float:yy, Float:zz, Float:ax, Float:ay, Float:az, radius, speed)
{
    new fine[MAX_PLAYERS];
    new str[256];

    if(objectcreated!=maxobject)
    {
        CreateDynamicObject(modelid, xx, yy, zz, ax, ay,az);
        objectcreated++;
    }

    if((distance1[playerid])>speed)
    {
    if(AntiTicketSpam[playerid] == 0)
    {
       if(gTeam[playerid] == TEAM_SFPD)
        {
        if(IsPlayerInCircle(playerid, xx, yy, radius)  && GetPlayerState(playerid)== PLAYER_STATE_DRIVER)
        {
            fine[playerid]= 200;
            new string[125];
            new playername[MAX_PLAYER_NAME];
            GivePlayerMoney(playerid, -fine[playerid]);
            new location[MAX_ZONE_NAME];
            GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
            format(str,sizeof(str), "You were driving faster than %d (Your speed was %d) MPH and got fined for $%d",speed, distance1[playerid] ,fine[playerid]);
            SendClientMessage(playerid, COLOR_RED, str);
            SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+1);
            SetTimerEx("PlayerAntiTicketSpam", 5000, false, "i", playerid);
            GetPlayerName(playerid, playername, sizeof(playername));
            format(string,sizeof(string),"Speed Alert: %s has been seen driveing %d in a %d zone. Location: %s",playername,distance1[playerid],speed,location);
            SendClientMessageToFreq(0,string,!playerid);
            AntiTicketSpam[playerid] = 1;
        }
    }
    }
    return 1;
}
Reply


Messages In This Thread
[HELP]Speed Camera Code - by [UG]Scripter - 18.04.2011, 04:35
Re: [HELP]Speed Camera Code - by iJumbo - 18.04.2011, 06:02
Re: [HELP]Speed Camera Code - by [UG]Scripter - 18.04.2011, 10:38
Re: [HELP]Speed Camera Code - by [UG]Scripter - 19.04.2011, 14:57
Re: [HELP]Speed Camera Code - by [UG]Scripter - 24.04.2011, 17:20
Re: [HELP]Speed Camera Code - by captainjohn - 24.04.2011, 18:11

Forum Jump:


Users browsing this thread: 2 Guest(s)