03.03.2014, 17:40
HI.How To Seet Rob a Player Whith Random Money?
and Maximum Robbery About 500 K.This is My Code But Not Work + Rep
and Maximum Robbery About 500 K.This is My Code But Not Work + Rep
Code:
new current_zone = player_zone[playerid];
new mrand = random(500000)+0; // A random number between 0 and 500000
SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_Robber_]]");
format(string,sizeof(string),"You Robbed $%d From %s(%d).Nic Rob!",mrand,PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_RED,string);
GivePlayerCash(ID, mrand); // Remove the money that was stolen from the player
IncreaseWantedLevel(playerid,8);
HasRobbedRecently[playerid] =180;
IncreasePlayerScore(playerid,1);
SendClientMessage(ID,COLOR_DEADCONNECT,"[[Robber]]");
format(string,sizeof(string),"Robbed You $%d By %s(%d) !",mrand,PlayerName(playerid),playerid);
SendClientMessage(ID,COLOR_RED,string);
GivePlayerCash(ID, -mrand); // Remove the money that was stolen from the player
format(string,sizeof(string),"[POLICE RADIO] Dozdi Shod: %s(%d) Mablaghe $%d Az %s(%d) JibZani Kard. Mahal: %s.",PlayerName(playerid),playerid,mrand,PlayerName(ID),ID,zones[current_zone][zone_name]);
SendClientMessageToAllCops(string);
return 1;
}

