25.03.2009, 20:40
Hey Guys, I use this command in my script and for some reason they get the money and then it goes away. Makes me think maybe I have the random money in the wrong place or maybe anti money cheat? I use the GF Platinum Script, not sure if this should be here or GF area.
Код:
//-------------------------[RobBank command]---------------------
if(strcmp(cmd, "/robbank", true) == 0)
{
if(PlayerToPoint(3, playerid,2315.4534,-0.8274,26.7422))
{
if(timesrobbed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, "You cannot rob the Bank more then once per day!");
}
if(timesrobbed[playerid] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new robmoney = random(20000);
SendClientMessage(playerid, 0xFF0000FF, " You Have Robbed The Bank ");
timesrobbed[playerid]+=1;
format(string, sizeof(string), "** HQ: The Bank in Los Santos has been robbed!!!!!. **", sendername);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
WantedPoints[playerid] =20; SetPlayerCriminal(playerid,255, "Robbing the BANK!");
format(string,sizeof(string), "* %s points his gun at the clerk and attempts to rob the Bank.", sendername);
SendClientMessage(playerid, COLOR_YELLOW, "You have been seen on the security cameras! Run away!");
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
format(string, sizeof(string), "** You have successfully stolen $%d!",robmoney);
SendClientMessage(playerid,COLOR_YELLOW,string);
GivePlayerMoney(playerid, robmoney);
}
}
return 1;
}

