04.01.2015, 11:44
Hello guys
today i made 2 Robing in 1 Commands i Changed Name Timer For 2 Rob To not Wait The Other store
now i done changed timer to can robing this after this but idk why he is telling me you cant robing now ?
how to fix ?
today i made 2 Robing in 1 Commands i Changed Name Timer For 2 Rob To not Wait The Other store
now i done changed timer to can robing this after this but idk why he is telling me you cant robing now ?
PHP код:
CMD:rob(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, -23.4826,-55.6319,1003.5469) && GetPlayerInterior(playerid) == 6)
{
if(robbed[playerid] == 1) return SendClientMessage(playerid, -1, "Wait before robbing again.");
robbed[playerid] = 1;
GameTextForPlayer( playerid, "~g~Robbery in process~n~~r~Do not leave The Store!", 30000, 3);
SetTimerEx("robtimer", 30000, false, "d", playerid);
SetTimerEx("robreset", 180000, false, "d", playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 4.0, -104.1407,-22.6708,1000.7188) && GetPlayerInterior(playerid) == 3)
{
if(robbed[playerid] == 1) return SendClientMessage(playerid, -1, "Wait before robbing again.");
robbed[playerid] = 1;
GameTextForPlayer( playerid, "~g~Robbery in process~n~~r~Do not leave The Store!", 30000, 3);
SetTimerEx("SexShop", 30000, false, "d", playerid);
SetTimerEx("SexShoprobreset", 180000, false, "d", playerid);
}
else
{
SendClientMessage(playerid, -1, "You're not in the store / or Checkpoints.");
}
return 1;
}
PHP код:
public SexShop(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, -104.1407,-22.6708,1000.7188) && GetPlayerInterior(playerid) == 3)
{
new string[128];
new cash = random(200000);
GivePlayerMoney(playerid, cash);
format(string, sizeof(string), "You have successfully robbed $%d from the SexShop!", cash);
SendClientMessage(playerid, COLOR_TWBLUE, string);
}
else //otherwise
{
SendClientMessage(playerid, -1, "Robbing failed, You left the store."); //he'll fail the robbing.
}
return 1;
}
public robtimer(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, -23.4826,-55.6319,1003.5469) && GetPlayerInterior(playerid) == 6)
{
new string[128];
new cash = random(200000);
GivePlayerMoney(playerid, cash);
format(string, sizeof(string), "You have successfully robbed $%d from the Seven!", cash);
SendClientMessage(playerid, COLOR_TWBLUE, string);
}
else //otherwise
{
SendClientMessage(playerid, -1, "Robbing failed, You left the store."); //he'll fail the robbing.
}
return 1;
}
public SexShoprobreset(playerid)
{
SexShoprobbed[playerid] = 0;
return 1;
}
public robreset(playerid)
{
robbed[playerid] = 0;
return 1;
}