SA-MP Forums Archive
Help Whit This +Reputation - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help Whit This +Reputation (/showthread.php?tid=612419)



Help Whit This +Reputation - CarRamper - 17.07.2016

Код:
    }
            default:
			{

                SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+1);
                SendClientMessage(playerid, yellow, "** - VEHICLE CMDS: /lock (Lock the vehicle) - /cw (Send a message to the passengers in your car) - /ej (Eject a player from your vehicle) - /ejall (Eject all passengers from your vehicle)**");
                new string[64];
                format(string, sizeof(string), "*CRIME* Vehicle Theft - Wanted Level %d", GetPlayerWantedLevel(playerid));
                SendClientMessage(playerid, red, string);
            }
        }
    }
Want to make that when a player enter vehicle he have a 1 out of 5 chance to get wanted.Please help Me Thanks


Re: Help Whit This +Reputation - Logic_ - 17.07.2016

PHP код:
                SendClientMessage(playeridyellow"** - VEHICLE CMDS: /lock (Lock the vehicle) - /cw (Send a message to the passengers in your car) - /ej (Eject a player from your vehicle) - /ejall (Eject all passengers from your vehicle)**");
                new 
string[64];
                if(
random(4) < 1)
                {
                    
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid)+1);
                }
                
format(stringsizeof(string), "*CRIME* Vehicle Theft - Wanted Level %d"GetPlayerWantedLevel(playerid));
                
SendClientMessage(playeridredstring); 
This will do it.