PHP код:
if(strcmp("/robar", cmdtext, true, 10) == 0)
{
if(AllowM6[playerid] == 1) return SendClientMessage(playerid, Rojo, "Tienes que esperar 5 Minutos!");
if(IsPlayerInRangeOfPoint(playerid, 1.0, -23.17, -55.64, 1003.54))
{
if(GetPlayerState(playerid)== 1)
{
new string[80];
ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 0, 0, 0, 1,500);
format(string, sizeof(string), "{003E8E}[GLS]: {FFFFFF}%s {FF0000}Empezo a Robar Un 24/7!", pName(playerid));
SendClientMessageToAll(0x33AA33AA, string);
GameTextForPlayer(playerid, "~b~Robando ~w~Tienda", 1000, 5);
AllowM6[playerid] = 1;
SetTimerEx("RobarTienda", 20000, false, "i", playerid);
SendClientMessage(playerid, Rojo, "Tienes que esperar 20 Segundos Para Que el Robo se ejecute");
}
}
SendClientMessage(playerid, -1, "No te encuentras en el lugar de robo");
return 1;
}
forward RobarTienda(playerid);
public RobarTienda(playerid)
{
new texto[64];
new rand_money = (random(4000) +1000);
GivePlayerMoney(playerid, rand_money);
format(texto, sizeof(texto), "Robo finalizado exitosamente, lograste robar $%d", rand_money);
SendClientMessage(playerid, -1, texto);
format(texto, sizeof(texto), "{003E8E}[GLS]: {FFFFFF}%s {FF0000}Robo el 24/7, y Gano {003E8E}$%d", pName(playerid), rand_money);
SendClientMessageToAll(0x33AA33AA, texto);
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 5);
SetTimerEx("Liberar6", 300000, false, "i", playerid);
ApplyAnimation(playerid, "PED", "endchat_01", 4.0, 0, 0, 0, 0, 0);
AllowM6[playerid] = 1;
return 1;
}