Speedcam
#1

Well i got the MLRP (Modern Life Roleplay) script made by Roy Nash. It says pay system in make when you go past limit of speedcam. I was wondering how do i make it that it takes money? A code will be nice thanks

Код:
                                        new CSpeed;
                                        CSpeed = GetPlayerSpeed(i, true);
                                        if(CSpeed > SpeedCams[p][scmaxspeed] && SpeedCamPlayer[i] == 0){
                                                SpeedCamPlayer[i] = 1;
												TextDrawShowForPlayer(i, radarTD[i]);
												SetTimerEx("RemoveRadarTD",1000, false, "i", i);
                                                format(String, sizeof(String), "You were caught on speed cam(%d/%d) ((Pay system in make))", CSpeed, SpeedCams[p][scmaxspeed]);
                                                SendClientMessage(i, COLOR_RED, String);
                                                SetTimerEx("SpeedCamCheck", 5000, false, "d", i);
                                        }
                                }
                        }
                }
        }
}
public SpeedCamCheck(playerid){
        SpeedCamPlayer[playerid] = 0;
        return 1;
}
Ill be giving +REP
Reply
#2

Add GivePlayerMoney with minus..
example
pawn Код:
new CSpeed = GetPlayerSpeed(i, true);
                                        if(CSpeed > SpeedCams[p][scmaxspeed] && SpeedCamPlayer[i] == 0)
                                        {
                                                SpeedCamPlayer[i] = 1;
                                                TextDrawShowForPlayer(i, radarTD[i]);
                                                SetTimerEx("RemoveRadarTD",1000, false, "i", i);
                                                format(String, sizeof(String), "You were caught on speed cam(%d/%d) ((Pay system in make))", CSpeed, SpeedCams[p][scmaxspeed]);
                                                SendClientMessage(i, COLOR_RED, String);
                                                SetTimerEx("SpeedCamCheck", 5000, false, "d", i);
                                               
                                                GivePlayerMoney(playerid, -100) //Change the -100 to whatever..
                                        }
                                }
                        }
                }
        }
}
Reply
#3

+REP thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)