==========================445~888====================================
if(strfind(cmd, "!afk", true, 0) != -1)
{
if(!playerisafk[playerid])
{
GetPlayerPos(playerid, px, py, pz);
new string[256];
format(string, sizeof(string), "%s is now AFK (Away from keyboard).", pname);
SendClientMessageToAll(0xFF875AA, string);
SetPlayerPos(playerid, 474.23223, -1717.48022, 62.5, 135, 0); // change date coords on your own (I've made it lighthouse's rooftop for a standart ;).
TogglePlayerControllable(playerid, 0);
playerisafk[playerid]=1;
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "You are still in the AFK mode.");
}
return 1;
}
else if(strfind(cmd, "!back", true, 0) != -1)
{
if(!playerisafk[playerid])
{
SendClientMessage(playerid, 0xFF0000AA, "You are not in the AFK mode.");
}
else
{
new string2[256];
format(string2, sizeof(string2), "%s is now Back", pname);
SendClientMessageToAll(0xFF875AA, string2);
SetPlayerPos(playerid, px, py, pz, 0, 0);
TogglePlayerControllable(playerid, 1);
playerisafk[playerid]=0;
}
return 1;
}
if (strcmp(cmd, "!goto", true) == 0)
{
tmp = strtok(cmdtext, idx);
new len = strlen(tmp);
if (!len) { format(szMsg,sizeof(szMsg),"Usage: !goto <name/id>",tmp);
SendClientMessage(playerid, COLOR_GREY, szMsg);return 1;}
newvar = FindPlayerIDFromString(tmp);
if (newvar != INACTIVE_PLAYER_ID) {
GetPlayerPos(newvar,x,y,z);
SetPlayerPos(playerid,x,y + 1.0,z,0,0);
format(szMsg,sizeof(szMsg),"Taking [%i] %s to [%i] %s.",playerid,gPlayers[playerid],newvar,gPlayers[newvar]);
SendClientMessageToAll(COLOR_GREEN, szMsg);
}
return 1;
}
else if (strcmp(cmd, "jail", true) == 0) {
if(IsPlayerAdmin(playerid))
{
new time[256],reason[256],plr;
tmp = strtok(cmdtext, idx),plr = FindPlayerIDFromString(tmp),time = strtok(cmdtext, idx),reason = strtok(cmdtext, idx);
if(Jail[plr] == 1) {
SendClientMessage(playerid,NOTACCES,"This Player Is In Jail !");
}
if(Jail[plr] == 0) {
if (!strlen(tmp) || !strlen(time) || !strlen(reason)) SendClientMessage(playerid,COLOR_RED, "USAGE: /c jail [Nick] [Min] [Reason]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
new string[256];
SetPlayerRandomJailSpawns(plr);
SetPlayerWeapon(plr,0,0);
SetPlayerWeapon(plr,0,0);
SetPlayerWeapon(plr,0,0);
SendClientMessageToAll(COLOR_YELLOW, string);
format(string,sizeof(string),"Reason:[ %s ].",cmdtext[strlen(tmp)+7]);
SendClientMessageToAll(COLOR_YELLOW, string);
SendClientMessage(plr,COLOR_YELLOW,"You have been jailed !");
SetTimer("unjail",(strval(time)*60000),false);
Jail[plr] = 1;
TogglePlayerControllable(plr,0);
}
}
}else{
SendClientMessage(playerid,NOTACCES,"***Not have permission to use this command!");
}
return 1;
}
else if(strcmp(cmd, "unjail", true) == 0) {
if(IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext, idx); new plr = FindPlayerIDFromString(tmp);
if(Jail[plr] == 0) {
SendClientMessage(playerid,NOTACCES,"This Player Is Not In Jail !");
}
if(Jail[plr] == 1) {
if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED, "USAGE: /c unjail [Nick]");
else{
if (plr != INACTIVE_PLAYER_ID) {
new string[256];
format(string,sizeof(string),"Admin %s has unjailed %s!",gPlayers[playerid],gPlayers[plr]);
SendClientMessageToAll(COLOR_YELLOW, string);
SetPlayerPos(plr,397.688, -471.821, 11.5172,0,0);
SendClientMessage(plr,COLOR_YELLOW,"You have been unjailed !");
Jail[plr] = 0;
TogglePlayerControllable(plr,1);
}
else SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
}
}
}else{
SendClientMessage(playerid,NOTACCES,"***Not have permission to use this command!");
}
return 1;
}
else if(strcmp(cmd, "buybomb", true) == 0) {
new cash = GetPlayerMoney(playerid);
if(HaveBomb[playerid] == 1) {
SendClientMessage(playerid,0xAA3333AA,"Already have a bomb !");
}
if(HaveBomb[playerid] == 0) {
if(cash >= 3000) {
SetPlayerMoney(playerid,cash - 3000);
HaveBomb[playerid] = 1;
SendClientMessage(playerid,0xFFFFFFAA,"You bought a bomb that has cost you $ 3,000");
}
if(cash < 3000) {
SendClientMessage(playerid,0xAA3333AA,"You do not have enough money to buy a bomb, need $ 3,000");
}
}
return 1;
}
else if(strcmp(cmd, "plantbomb", true) == 0) {
if(IsPlayerInAnyVehicle(playerid)) {
new vehicleid = GetPlayerVehicleID(playerid);
if(HaveBomb[playerid] == 1) {
if(BombPlanted[vehicleid] == 1) {
SendClientMessage(playerid,0xAA3333AA,"In this car is already planted a bomb !");
}
if(BombPlanted[vehicleid] == 0) {
BombPlanted[vehicleid] = 1;
RemovePlayerFromVehicle(playerid);
HaveBomb[playerid] = 0;
SendClientMessage(playerid,0xFFFFFFAA,"The bomb was planted successfully");
SendClientMessage(playerid,0xFFFFFFAA,"The next player to enter the car as a driver will be stuck in the car and the bomb will be detonated!");
}
}
else {
SendClientMessage(playerid,0xAA3333AA,"You must first buy a bomb !");
}
}
else {
SendClientMessage(playerid,0xAA3333AA,"You need to be in a vehicle !");
}
return 1;
}
else if(strcmp(cmd, "fhelp", true) == 0) {
SendClientMessage(playerid,COLOR_YELLOW,"-----------Fishing Help-----------");
SendClientMessage(playerid,COLOR_YELLOW,"For a good job, type '/aim' before fishing !");
SendClientMessage(playerid,COLOR_YELLOW,"For eat,sell,live fish type '[/c] eatf, sellf,livef' !");
SendClientMessage(playerid,COLOR_YELLOW,"For Fishing type '/c fishing' !");
SendClientMessage(playerid,COLOR_YELLOW,"For buy rod and worms type '/c buyrod' , '/c buyworms' at shop !");
SendClientMessage(playerid,COLOR_YELLOW,"For put the fishing rod in your hand type '/c rod' !");
SendClientMessage(playerid,COLOR_YELLOW,"-----------Fishing Help-----------");
return 1;
}
else if(strcmp(cmd, "rod", true) == 0) {
if(boughtr[playerid] == 1) {
GivePlayerWeapon(playerid,3,1);
}
if(boughtr[playerid] == 0) {
SendClientMessage(playerid,COLOR_GREEN,"You don't have a fishing rod! Go to shop to buy!");
}
return 1;
}
else if(strcmp(cmd, "buyrod", true) == 0) {
if((7, playerid, -712.7392, -1500.4816, 11.4436)) {
new cash = GetPlayerMoney(playerid);
if(boughtr[playerid] == 1) {
SendClientMessage(playerid,COLOR_YELLOW,"Already have a fishing rod!");
SendClientMessage(playerid,COLOR_YELLOW,"For put the rod in your hand type '/c rod' !");
}
if(boughtr[playerid] == 0) {
if(cash >= 5000) {
SendClientMessage(playerid,COLOR_YELLOW,"You bought a fishing rod!");
GivePlayerWeapon(playerid,3,1);
boughtr[playerid] = 1;
SetPlayerMoney(playerid,GetPlayerMoney(playerid) - 5000);
}
if(cash < 5000) {
SendClientMessage(playerid,COLOR_YELLOW,"Need more money ! Need $5000 for this rod!");
}
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"You not are at shop!");
}
return 1;
}
else if(strcmp(cmd, "buyworms", true) == 0) {
if((7, playerid, -712.7392, -1500.4816, 11.4436)) {
new cash = GetPlayerMoney(playerid);
if(boughtw[playerid] > 0 && boughtw[playerid] < 10) {
SendClientMessage(playerid,COLOR_YELLOW,"You have worms!");
}
if(boughtw[playerid] == 0) {
if(cash >= 3000) {
SendClientMessage(playerid,COLOR_YELLOW,"You bought 10 worms !");
boughtw[playerid] = 10;
SetPlayerMoney(playerid,GetPlayerMoney(playerid) - 3000);
}
if(cash < 3000) {
SendClientMessage(playerid,COLOR_YELLOW,"Need more money ! Need $3000 for worms!");
}
}
}
else
{
SendClientMessage(playerid,COLOR_GREEN,"You not are at shop!");
}
return 1;
}
else if(strcmp(cmd, "sellf", true) == 0) {
new rand = random(sizeof(randomfish));
if(hfish[playerid] == 0) {
SendClientMessage(playerid,COLOR_GREEN,"You don't have a fish!");
}
if(hfish[playerid] == 1) {
SendClientMessage(playerid,COLOR_YELLOW,"You sold your fish for money!");
SetPlayerMoney(playerid,GetPlayerMoney(playerid) + randomfish[rand][mon]);
hfish[playerid] = 0;
}
return 1;
}
else if(strcmp(cmd, "eatf", true) == 0) {
new rand = random(sizeof(randomfish));
new Float:Health;
GetPlayerHealth(playerid,Health);
if(hfish[playerid] == 0) {
SendClientMessage(playerid,COLOR_GREEN,"You don't have a fish!");
}
if(hfish[playerid] == 1) {
SendClientMessage(playerid,COLOR_YELLOW,"You ate your fish for health!");
SetPlayerHealth(playerid,Health + randomfish[rand][hp]);
hfish[playerid] = 0;
}
return 1;
}
else if(strcmp(cmd, "leavef", true) == 0) {
if(hfish[playerid] == 0) {
SendClientMessage(playerid,COLOR_GREEN,"You don't have a fish!");
}
if(hfish[playerid] == 1) {
SendClientMessage(playerid,COLOR_YELLOW,"You want to live your fish, so.. say Bye!");
SendClientMessage(playerid,COLOR_YELLOW,"The fish say: Thank You Very Much! Im so happy!");
hfish[playerid] = 0;
}
return 1;
}
else if(strcmp(cmd, "fishing", true) == 0) {
if((30, playerid,-563.4057, -1514.9204, 4.8351 ) || (30, playerid,-600.0203, -1527.4523, 5.9322) || (30,playerid,-627.0029, -1516.8279, 8.1077) || (30,playerid,-580.3753, -1475.2249, 4.0794) || (30,playerid,-621.3587, -1459.5869, 3.7448)) {
if(fishing[playerid] == 1) {
SendClientMessage(playerid,COLOR_GREEN,"Already Fishing!");
}
if(fishing[playerid] == 0) {
if(boughtr[playerid] == 0) {
SendClientMessage(playerid,COLOR_GREEN,"Need rod for fishing! Go to shop to buy!");
}
if(boughtr[playerid] == 1) {
if(boughtw[playerid] == 0) {
GameTextForPlayer(playerid,"~o~not have worms!");
SendClientMessage(playerid,COLOR_GREEN,"Not have worms! Go to shop to buy!");
}
if(boughtw[playerid] == 1) {
GameTextForPlayer(playerid,"~o~For a good job, type ~w~/aim ~o~!");
SendClientMessage(playerid,COLOR_YELLOW,"Wait 5 seconds to find a fish!");
SendClientMessage(playerid,COLOR_YELLOW,"Now, you have just 1 worm!");
SetTimer("waitfish", 5000, false);
fishing[playerid] = 1;
boughtw[playerid] = 0;
TogglePlayerControllable(playerid,0);
GivePlayerWeapon(playerid,3,1);
}
if(boughtw[playerid] == 2) {
GameTextForPlayer(playerid,"~o~For a good job, type ~w~/aim ~o~!");
SendClientMessage(playerid,COLOR_YELLOW,"Wait 5 seconds to find a fish!");
SendClientMessage(playerid,COLOR_YELLOW,"Now, you have just 1 worm!");
SetTimer("waitfish", 5000, false);
fishing[playerid] = 1;
boughtw[playerid] = 1;
TogglePlayerControllable(playerid,0);
GivePlayerWeapon(playerid,3,1);
}
if(boughtw[playerid] == 3) {
GameTextForPlayer(playerid,"~o~For a good job, type ~w~/aim ~o~!");
SendClientMessage(playerid,COLOR_YELLOW,"Wait 5 seconds to find a fish!");
SendClientMessage(playerid,COLOR_YELLOW,"Now, you have just 2 worms!");
SetTimer("waitfish", 5000, false);
fishing[playerid] = 1;
boughtw[playerid] = 2;
TogglePlayerControllable(playerid,0);
GivePlayerWeapon(playerid,3,1);
}
if(boughtw[playerid] == 4) {
GameTextForPlayer(playerid,"~o~For a good job, type ~w~/aim ~o~!");
SendClientMessage(playerid,COLOR_YELLOW,"Wait 5 seconds to find a fish!");
SendClientMessage(playerid,COLOR_YELLOW,"Now, you have just 3 worms!");
SetTimer("waitfish", 5000, false);
fishing[playerid] = 1;
boughtw[playerid] = 3;
TogglePlayerControllable(playerid,0);
GivePlayerWeapon(playerid,3,1);
}
if(boughtw[playerid] == 5) {
GameTextForPlayer(playerid,"~o~For a good job, type ~w~/aim ~o~!");
SendClientMessage(playerid,COLOR_YELLOW,"Wait 5 seconds to find a fish!");
SendClientMessage(playerid,COLOR_YELLOW,"Now, you have just 4 worms!");
SetTimer("waitfish", 5000, false);
fishing[playerid] = 1;
boughtw[playerid] = 4;
TogglePlayerControllable(playerid,0);
GivePlayerWeapon(playerid,3,1);
}
if(boughtw[playerid] == 6) {
GameTextForPlayer(playerid,"~o~For a good job, type ~w~/aim ~o~!");
SendClientMessage(playerid,COLOR_YELLOW,"Wait 5 seconds to find a fish!");
SendClientMessage(playerid,COLOR_YELLOW,"Now, you have just 5 worms!");
SetTimer("waitfish", 5000, false);
fishing[playerid] = 1;
boughtw[playerid] = 5;
TogglePlayerControllable(playerid,0);
GivePlayerWeapon(playerid,3,1);
}
if(boughtw[playerid] == 7) {
GameTextForPlayer(playerid,"~o~For a good job, type ~w~/aim ~o~!");
SendClientMessage(playerid,COLOR_YELLOW,"Wait 5 seconds to find a fish!");
SendClientMessage(playerid,COLOR_YELLOW,"Now, you have just 6 worms!");
SetTimer("waitfish", 5000, false);
fishing[playerid] = 1;
boughtw[playerid] = 6;
TogglePlayerControllable(playerid,0);
GivePlayerWeapon(playerid,3,1);
}
if(boughtw[playerid] == 8) {
GameTextForPlayer(playerid,"~o~For a good job, type ~w~/aim ~o~!");
SendClientMessage(playerid,COLOR_YELLOW,"Wait 5 seconds to find a fish!");
SendClientMessage(playerid,COLOR_YELLOW,"Now, you have just 7 worms!");
SetTimer("waitfish", 5000, false);
fishing[playerid] = 1;
boughtw[playerid] = 7;
TogglePlayerControllable(playerid,0);
GivePlayerWeapon(playerid,3,1);
}
if(boughtw[playerid] == 9) {
GameTextForPlayer(playerid,"~o~For a good job, type ~w~/aim ~o~!");
SendClientMessage(playerid,COLOR_YELLOW,"Wait 5 seconds to find a fish!");
SendClientMessage(playerid,COLOR_YELLOW,"Now, you have just 8 worms!");
SetTimer("waitfish", 5000, false);
fishing[playerid] = 1;
boughtw[playerid] = 8;
TogglePlayerControllable(playerid,0);
GivePlayerWeapon(playerid,3,1);
}
if(boughtw[playerid] == 10) {
GameTextForPlayer(playerid,"~o~For a good job, type ~w~/aim ~o~!");
SendClientMessage(playerid,COLOR_YELLOW,"Wait 5 seconds to find a fish!");
SendClientMessage(playerid,COLOR_YELLOW,"Now, you have just 9 worms!");
SetTimer("waitfish", 5000, false);
fishing[playerid] = 1;
boughtw[playerid] = 9;
TogglePlayerControllable(playerid,0);
GivePlayerWeapon(playerid,3,1);
}
}
}
}
else
{
SendClientMessage(playerid,COLOR_GREEN,"You not are at port, on legal zone!");
}
return 1;
}
else if (strcmp(cmd, "!hp", true) == 0)
{
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) {
GetPlayerHealth(playerid,x);
GetPlayerArmour(playerid,y);
SetSpikes(playerid,1);
if (IsPlayerInAnyVehicle(playerid))
{
GetVehicleHealth(GetPlayerVehicleID(playerid),z);
format(szMsg,sizeof(szMsg),"[%i] %s - Health %.0f - Armour %.0 Vehicle Health %.0f",playerid,gPlayers[playerid],x,y,z);
} else {
format(szMsg,sizeof(szMsg),"[%i] %s - Health %.1f - Armour %.1f",playerid,gPlayers[playerid],x,y);
}
SendClientMessageToAll(COLOR_GREEN, szMsg);
} else {
newvar = FindPlayerIDFromString(tmp);
if (newvar != INACTIVE_PLAYER_ID) {
GetPlayerHealth(newvar,x);
GetPlayerArmour(newvar,y);
if (IsPlayerInAnyVehicle(newvar))
{
GetVehicleHealth(GetPlayerVehicleID(newvar),z);
format(szMsg,sizeof(szMsg),"[%i] %s - Health %.0f - Armour %.0 Vehicle Health %.0f",newvar,gPlayers[newvar],x,y,z);
} else {
format(szMsg,sizeof(szMsg),"[%i] %s - Health %.0f - Armour %.0f",newvar,gPlayers[newvar],x,y); }
SendClientMessageToAll(COLOR_GREEN, szMsg);
}
}
return 1;
}
else if (strcmp(cmd, "robbank", true) == 0) {
{
tmp = strtok(cmdtext, idx);
if(Maletin[playerid] == 1) {
SendClientMessage(playerid,0xAA3333AA,"You've robbed the bank! You can not steal it again!");
}
else if((playerid,-945.0223,-938.2779,-346.0285,-341.7365)) SendClientMessage(playerid, COLOR_GREEN,"[Error] - You must be in the bank vault to steal it!");
else {
GameTextForPlayerBottom(playerid,"~y~ >>>>");
TogglePlayerControllable(playerid,0);
SetTimer("roboenprogreso", 9000, false);
SendClientMessage(playerid, COLOR_YELLOW,"Right now you're robbing the bank");
SetWantedLevel(playerid,6);
format( szMsg, sizeof( szMsg ), "%s is robbing the bank, the police has been informed", gPlayers[ playerid ], cmdtext[ strlen( tmp ) +8 ] );
SendClientMessageToAll( COLOR_YELLOW, szMsg );
SetPlayerMarker(playerid,15);
SetPlayerSkin(playerid,0);
SetPlayerSkin(playerid,129);
ToggleGreenScanlinesForPlayer(playerid,1);
ToggleWidescreenForPlayer(playerid,1);
Maletin[playerid] = 1;
}
}
return 1;
}
else if ( strcmp( cmd, "botoff", true ) == 0 )
{
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );