10.01.2012, 10:42
Im adding features to my robbank system.But i dont know howto add when the player rob the bank
The player must wait 2 minutes than the robberry be success.And i want it to give 10 wanted stars or level.
How can i add it.Heres the pawn code
The player must wait 2 minutes than the robberry be success.And i want it to give 10 wanted stars or level.
How can i add it.Heres the pawn code
pawn Код:
if(strcmp(cmd, "/robbank", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(robbing[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " You are already robbing the bank, please slow down");
return 1;
}
if(PlayerInfo[giveplayerid][pWantedLevel] >= 6)
{
SendClientMessage(playerid, COLOR_GREY, " That player is at the max wanted level !");
return 1;
}
if(alreadyrobbed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You already robbed the bank! Wait for 1 hour.");
return 1;
}
if(PlayerInfo[playerid][pLevel] <= 3)
{
SendClientMessage(playerid, COLOR_GREY, "You need to be atlest level 3 to rob the bank");
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2328.8669,-1919.2814,828.1979))
{
SendClientMessage(playerid, COLOR_GREY, " You are not at the bank !");
return 1;
}
SetTimerEx("RobTimer", 30000, false, "i", playerid);
SendClientMessage(playerid, COLOR_WHITE, "You have Robbed Los Santos Local Bank And Stole Money from the bank - Stay low From Cops for few minutes");
robbing[playerid] = 1;
LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, 0);
PlayerInfo[playerid][pCash] += 200000;
SendClientMessageToAll(COLOR_LIGHTBLUE, "City Alert:The Los Santos Local Bank is being robbed!");
return 1;
}
}