if(strcmp("/rob",cmdtext,true)==0) { if(PlayerToPoint(25.0,playerid,-27.8412,-89.3996,1003.5469) || PlayerToPoint(25.0,playerid,-30.7268,-28.3191,1003.5573)) { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "[CRIMINAL]%s just robbed a 24/7 store!.", pName); SendClientMessageToAll(COLOR_GREY, string); RobbedRecently[playerid] = 1; robcash = GivePlayerMoney(playerid, robberycash[random(sizeof(robberycash))]); format(string, sizeof(string), "~w~$%d ~y~stolen",robcash); GameTextForPlayer(playerid, string, 5000, 1); if(robcash <= 1000) { SetPlayerWantedLevel(playerid,1); } if(robcash <= 2000) { SetPlayerWantedLevel(playerid,2); } if(robcash <= 3000) { SetPlayerWantedLevel(playerid,3); } if(robcash <= 4000) { SetPlayerWantedLevel(playerid,4); } if(robcash <= 5000) { SetPlayerWantedLevel(playerid,5); } if(robcash <= 6000) { SetPlayerWantedLevel(playerid,6); } } else return SendClientMessage(playerid, COLOR_LIME, "Your not inside one of the two 24/7's in Los Santos"); return 1; } |
if(strcmp("/rob",cmdtext,true)==0) { if(PlayerToPoint(25.0,playerid,-27.8412,-89.3996,1003.5469) || PlayerToPoint(25.0,playerid,-30.7268,-28.3191,1003.5573)) { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "[CRIMINAL]%s just robbed a 24/7 store!.", pName); SendClientMessageToAll(COLOR_GREY, string); RobbedRecently[playerid] = 1; robcash = GivePlayerMoney(playerid, robberycash[random(sizeof(robberycash))]); format(string, sizeof(string), "~w~$%s ~y~stolen",robcash); GameTextForPlayer(playerid, string, 5000, 1); if(robcash <= 1000) { SetPlayerWantedLevel(playerid,1); } if(robcash <= 2000) { SetPlayerWantedLevel(playerid,2); } if(robcash <= 3000) { SetPlayerWantedLevel(playerid,3); } if(robcash <= 4000) { SetPlayerWantedLevel(playerid,4); } if(robcash <= 5000) { SetPlayerWantedLevel(playerid,5); } if(robcash <= 6000) { SetPlayerWantedLevel(playerid,6); } } else return SendClientMessage(playerid, COLOR_LIME, "Your not inside one of the two 24/7's in Los Santos"); return 1; }
if(strcmp("/rob",cmdtext,true)==0) { if(PlayerToPoint(25.0,playerid,-27.8412,-89.3996,1003.5469) || PlayerToPoint(25.0,playerid,-30.7268,-28.3191,1003.5573)) { new pName[MAX_PLAYER_NAME]; new playercash; new totalcash; new stolencash; playercash = GetPlayerMoney(playerid); GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "[CRIMINAL]%s just robbed a 24/7 store!.", pName); SendClientMessageToAll(0xFF6347AA, string); RobbedRecently[playerid] = 1; GivePlayerMoney(playerid, robberycash[random(sizeof(robberycash))]); totalcash = GetPlayerMoney(playerid); stolencash = totalcash - playercash; format(string, sizeof(string), "~r~Value Stolen ~n~~y~ $%d",stolencash); GameTextForPlayer(playerid, string, 5000, 1); SetPlayerColor(playerid,0xFF6347AA); if(stolencash >= 500 && stolencash <= 1999) { SetPlayerWantedLevel(playerid,1); } if(stolencash >= 1000 && stolencash <= 2999) { SetPlayerWantedLevel(playerid,2); } if(stolencash >= 3000 && stolencash <= 3999) { SetPlayerWantedLevel(playerid,3); } if(stolencash >= 4000 && stolencash <= 4999) { SetPlayerWantedLevel(playerid,4); } if(stolencash >= 5000 && stolencash <= 5999) { SetPlayerWantedLevel(playerid,5); } if(stolencash >= 6000) { SetPlayerWantedLevel(playerid,6); } } else return SendClientMessage(playerid, COLOR_LIME, "Your not inside one of the two 24/7's in Los Santos"); return 1; } |