GameTextForPlayer problem [SOLVED]
#1

Now what im trying to do is make it so when you rob one of the stores, the GameTextForPlayer tells you how much. It compiles without any problems but when it comes to robbing the store, it doesnt tell me how much i was "Given" it just says "$1 Stolen".. Where the minimum amount for the "RobberyCash" is $500. Can someone please check to see why its not showing me the amount that is actually stolen. And let me know how i can fix it.

Thanks to anyone who can help.

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];
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;
}

Reply


Messages In This Thread
GameTextForPlayer problem [SOLVED] - by chaosnz - 11.05.2010, 05:25
Re: GameTextForPlayer problem - by -Rebel Son- - 11.05.2010, 05:32
Re: GameTextForPlayer problem - by chaosnz - 11.05.2010, 22:25

Forum Jump:


Users browsing this thread: 1 Guest(s)