Speed cam
#5

Well, I just removed the break... it didn't let me pass the other objects
anyways, now you are here, (i dont wanna go off-topic but I don't wanna thread post whore either)
can you help me with this?
I made for the speedcam thing, something that gives you a ticket, you can either pay the ticket or don't pay the ticket.
look:
pawn Код:
for(new i; i != sizeof gObjects90; ++i) {
        if(IsPlayerInRangeOfPoint(playerid, 25.0, gObjects90[i][0], gObjects90[i][1], gObjects90[i][2])) {
            if(IsFlashed[playerid] == 0)
            {
                new Float:speed_x,Float:speed_y,Float:speed_z,Float:final_speed,speed_string[300],final_speed_int,speed_string2[300];
                new vehicleid;
                vehicleid = GetPlayerVehicleID(playerid);
               
                SendClientMessage(playerid,COLOR_RED, " ");
                GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
                final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*136.666667;
                final_speed_int = floatround(final_speed,floatround_round);
                format(speed_string,300,"* U were driving {FF6347}%i{FF0000}, while U were only allowed to drive {FF6347}90{FF0000}KPH, For that U must pay: ${FF6347}%i{FF0000}",final_speed_int, final_speed_int*2);
                //format(string,sizeof(string),"U were driving %i, while U were only allowed to drive 90KPH, For that U lost: %i bucks",vehspeed,vehspeed*2);
                SendClientMessage(playerid,COLOR_RED, speed_string);
                GameTextForPlayer(playerid,"~r~B~y~U~b~S~g~T~w~E~p~D",5000,3);
               
                //Dialog om te betalen
                format(speed_string2,300,"{FFFFFF}U must pay: ${FF6347}%i{FFFFFF}\nBecause You were Driving {FF6347}%i{FFFFFF}Faster than allowed!\n\nIf you don't pay, U will becoma a suspect!",final_speed_int*2,final_speed_int-90);
                ShowPlayerDialog(playerid,DIALOG_PAYME,DIALOG_STYLE_MSGBOX,"Speed Cam",speed_string2,"Pay","Fuck off!");
               
                camflash(playerid);
                SetTimerEx("resflashed",3000,false,"i",playerid);
                IsFlashed[playerid] = 1;
            }
        }
    }
and

pawn Код:
//==============================================================================
//Pay ticket when flashed
//==============================================================================
    if(dialogid == DIALOG_PAYME)
    {
        if(!response)
        {
            //Will make that later
        }
        else
        {
            //here I need the pay ticket stuff
        }
    }
well, how can I use the amount of money used under OnPlayerUpdate, and use it in my OnDialogResponse?
I need the finalspeed_int*2 amount, to be able to use anywhere in my GM :/
Reply


Messages In This Thread
Problem 1 solved, problem 2 not - by knackworst - 10.09.2011, 16:28
Re: Speed cam - by Max_Coldheart - 10.09.2011, 16:51
Re: Speed cam - by knackworst - 10.09.2011, 17:07
Re: Speed cam - by Max_Coldheart - 10.09.2011, 17:11
Re: Speed cam - by knackworst - 10.09.2011, 20:07
Re: Speed cam - by andrew4699 - 10.09.2011, 21:55
Re: Speed cam - by knackworst - 10.09.2011, 22:03
Re: Speed cam - by knackworst - 11.09.2011, 00:30
Re: Speed cam - by =WoR=Varth - 11.09.2011, 06:35
Re: Speed cam - by knackworst - 11.09.2011, 11:30

Forum Jump:


Users browsing this thread: 2 Guest(s)