11.05.2010, 22:25
i ended up fixing my problem but what you gave me blink didnt was for displaying someones name.
I ended up doing this..
I just added the parts in bold and it worked fine. If anyone needs a rob command they can use mine if they like.
I ended up doing this..
Quote:
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; } |