Want To Add Random Wanted Level -
CarRamper - 17.07.2016
I Want to script that when a player enter a vehicle he have one out of five chances of getting wanted please help me i want to apply it to this code
Only To case 400,403,405,409,411,412,414,416,415,419,420,422,42 3,424,428,431,434,436,439,440,442,443,444,451,448, 457,461,463,466,468,470,471,474,477,479,480,489,49 0,492,494,496,499,500,504,503,506,510, 514,515,517,522,524,525,527,535,534,536,541,542,54 3,546,549,552,555,554,557,556,559,558,560,562,566, 565,568,574,576,578,579,587,588,603
Vehicles
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER && gTeam[playerid] != TEAM_COP)
{
switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
{
case 497, 447, 523, 433, 427, 528, 407, 544, 596, 597, 598, 599, 432, 601, 472, 430:
{
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+4);
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 - Law Enforcement Vehicle Theft - Wanted Level %d ", GetPlayerWantedLevel(playerid));
SendClientMessage(playerid, red, string);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i))continue;
if(gTeam[i] == TEAM_COP)
{
new copmsg[170];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(copmsg, sizeof(copmsg), "- WARNING ALL COPS: Law Enforcement Vehicle Theft By %s (%d)",name,playerid);
SendClientMessage(i, COLOR_BLUE, copmsg);
}
}
}
case 400,403,405,409,411,412,414,416,415,419,420,422,423,424,428,431,434,436,439,440,442,443,444,451,448,457,461,463,466,468,470,471,474,477,479,480,489,490,492,494,496,499,500,504,503,506,510, 514,515,517,522,524,525,527,535,534,536,541,542,543,546,549,552,555,554,557,556,559,558,560,562,566,565,568,574,576,578,579,587,588,603:
{
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);
}
}
}
Re: Want To Add Random Wanted Level -
K0P - 17.07.2016
Код:
case 400,403,405,409,411,412,414,416,415,419,420,422,423,424,428,431,434,436,439,440,442,443,444,451,448,457,461,463,466,468,470,471,474,477,479,480,489,490,492,494,496,499,500,504,503,506,510, 514,515,517,522,524,525,527,535,534,536,541,542,543,546,549,552,555,554,557,556,559,558,560,562,566,565,568,574,576,578,579,587,588,603:
{
new wantedlevel = random(5);
SetPlayerWantedLevel(playerid, wantedlevel);
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);
}
Re: Want To Add Random Wanted Level -
WatchDog - 17.07.2016
Yes To It
Re: Want To Add Random Wanted Level -
CarRamper - 17.07.2016
Yes how i can apply 5 out of 1 chance of getting wanted
Re: Want To Add Random Wanted Level -
CarRamper - 17.07.2016
Thanks