25.03.2010, 16:02
Hi , i would like to make the command for robbing bank ..
How would it work :
Players go to bank at this point : 2315.2446,-1.0065,26.7422
There they type /robbank , and if wanted level is > than 5 , it says You have too big wanted lvl to robbank ! And if it is lower , it sets their wanted lvl to 10 and sands PD/FBI message "Someone is robbing the bank !"
Now they need to go somewhere to put money ( it makes them checkpoint at the map)
When they are there , they get random money from 1000-100000
To lose Wanted Level , they need to go somewhere else ...
I'm using GTA:RP script and here is something , i have started , but i don't know how to finish , i have just edited /givemoney admin command :
//----------------------------------[Robbank]------------------------------------------------
if(strcmp(cmd, "/robbank", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /robbank");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if (PlayerInfo[playerid][pWantedDeaths] <= 5)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
//ConsumingMoney[playa] = 1;
SafeGivePlayerMoney(playa, money);
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, "[ADMIN] %s has admin-given %s $%d.", sendername,giveplayer,money);
ABroadCast(COLOR_YELLOW,string,1);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You Have to big wanted level to rob the bank!");
}
}
return 1;
}
//----------------------------------[Robbank]------------------------------------------------
who knows ,please help
How would it work :
Players go to bank at this point : 2315.2446,-1.0065,26.7422
There they type /robbank , and if wanted level is > than 5 , it says You have too big wanted lvl to robbank ! And if it is lower , it sets their wanted lvl to 10 and sands PD/FBI message "Someone is robbing the bank !"
Now they need to go somewhere to put money ( it makes them checkpoint at the map)
When they are there , they get random money from 1000-100000
To lose Wanted Level , they need to go somewhere else ...
I'm using GTA:RP script and here is something , i have started , but i don't know how to finish , i have just edited /givemoney admin command :
//----------------------------------[Robbank]------------------------------------------------
if(strcmp(cmd, "/robbank", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /robbank");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if (PlayerInfo[playerid][pWantedDeaths] <= 5)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
//ConsumingMoney[playa] = 1;
SafeGivePlayerMoney(playa, money);
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, "[ADMIN] %s has admin-given %s $%d.", sendername,giveplayer,money);
ABroadCast(COLOR_YELLOW,string,1);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You Have to big wanted level to rob the bank!");
}
}
return 1;
}
//----------------------------------[Robbank]------------------------------------------------
who knows ,please help
![smiley](images/smilies/exclaim.gif)
![cheesy](images/smilies/lol.gif)
![cheesy](images/smilies/lol.gif)