27.03.2012, 22:54
Boas, eu tou fazendo um sistema de weed em varios locais. O /plantseed ta a funcionar direito mas quando faзo /harvestweed num lugar, no outro nao da. Diz Unknown Command. Alguem me pode ajudar?
pawn Код:
}
if(strcmp(cmd, "/plantseed", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0,2542.60009766,-1587.80004883,22.00000000))
{
if(plantou == 1) return SendClientMessage(playerid, 0xFF8282AA, " Seems someone already planted here, wait some more time."); // Comeзo do Comando
plantou = 1;
{
SendClientMessage(playerid, COLOR_GROVE, "You've planted a seed, wait them to grow.");
SendClientMessage(playerid, COLOR_GREY, "When it's ready, type /harvestweed to take it.");
SafeGivePlayerMoney(playerid, - 400);
SetTimerEx("WeedGrow", 120000, 0, "i", playerid);
SetTimer("TimerPlantou",600000,true);
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 2459.0458984375, -1720.3848876953, 12.951972007751))
{
if(plantou3 == 1) return SendClientMessage(playerid, 0xFF8282AA, " Seems someone already planted here, wait some more time."); // Comeзo do Comando
plantou3 = 1;
{
SendClientMessage(playerid, COLOR_GROVE, "You've planted a seed, wait them to grow.");
SendClientMessage(playerid, COLOR_GREY, "When it's ready, type /harvestweed to take it.");
SafeGivePlayerMoney(playerid, - 400);
SetTimerEx("WeedGrow2", 120000, 0, "i", playerid);
SetTimer("TimerPlantou3",600000,true);
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 2541.9606933594, -1587.4586181641, 20.970590591431))
{
if(plantou4 == 1) return SendClientMessage(playerid, 0xFF8282AA, " Seems someone already planted here, wait some more time."); // Comeзo do Comando
plantou4 = 1;
{
SendClientMessage(playerid, COLOR_GROVE, "You've planted a seed, wait them to grow.");
SendClientMessage(playerid, COLOR_GREY, "When it's ready, type /harvestweed to take it.");
SafeGivePlayerMoney(playerid, - 400);
SetTimerEx("WeedGrow3", 120000, 0, "i", playerid);
SetTimer("TimerPlantou4",600000,true);
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 2522.3913574219, -949.70550537109, 81.87281036377))
{
if(plantou5 == 1) return SendClientMessage(playerid, 0xFF8282AA, " Seems someone already planted here, wait some more time."); // Comeзo do Comando
plantou5 = 1;
{
SendClientMessage(playerid, COLOR_GROVE, "You've planted a seed, wait them to grow.");
SendClientMessage(playerid, COLOR_GREY, "When it's ready, type /harvestweed to take it.");
SafeGivePlayerMoney(playerid, - 400);
SetTimerEx("WeedGrow4", 120000, 0, "i", playerid);
SetTimer("TimerPlantou5",600000,true);
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 1940.8305664063, -1167.1307373047, 20.356550216675))
{
if(plantou6 == 1) return SendClientMessage(playerid, 0xFF8282AA, " Seems someone already planted here, wait some more time."); // Comeзo do Comando
plantou6 = 1;
{
SendClientMessage(playerid, COLOR_GROVE, "You've planted a seed, wait them to grow.");
SendClientMessage(playerid, COLOR_GREY, "When it's ready, type /harvestweed to take it.");
SafeGivePlayerMoney(playerid, - 400);
SetTimerEx("WeedGrow5", 120000, 0, "i", playerid);
SetTimer("TimerPlantou6",600000,true);
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 699.6259765625, -913.1455078125, 76.373420715332))
{
if(plantou7 == 1) return SendClientMessage(playerid, 0xFF8282AA, " Seems someone already planted here, wait some more time."); // Comeзo do Comando
plantou7 = 1;
{
SendClientMessage(playerid, COLOR_GROVE, "You've planted a seed, wait them to grow.");
SendClientMessage(playerid, COLOR_GREY, "When it's ready, type /harvestweed to take it.");
SafeGivePlayerMoney(playerid, - 400);
SetTimerEx("WeedGrow6", 120000, 0, "i", playerid);
SetTimer("TimerPlantou7",600000,true);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_CREAM, "You are not in a weed field.");
return 1;
}
}
if(strcmp(cmd, "/harvestweed", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0,2542.60009766,-1587.80004883,22.00000000))
{
if(FakeWeed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GROVE, "You've collected 20 grams of weed.");
FakeWeed[playerid] = 0;
Weed[playerid] += 20;
DestroyObject(weedblip[playerid]);
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 2459.0458984375, -1720.3848876953, 12.951972007751))
{
if(FakeWeed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GROVE, "You've collected 20 grams of weed.");
FakeWeed[playerid] = 0;
Weed[playerid] += 20;
DestroyObject(weedblip[playerid]);
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 2541.9606933594, -1587.4586181641, 20.970590591431))
{
if(FakeWeed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GROVE, "You've collected 20 grams of weed.");
FakeWeed[playerid] = 0;
Weed[playerid] += 20;
DestroyObject(weedblip[playerid]);
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 2522.3913574219, -949.70550537109, 81.87281036377))
{
if(FakeWeed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GROVE, "You've collected 20 grams of weed.");
FakeWeed[playerid] = 0;
Weed[playerid] += 20;
DestroyObject(weedblip[playerid]);
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 1940.8305664063, -1167.1307373047, 20.356550216675))
{
if(FakeWeed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GROVE, "You've collected 20 grams of weed.");
FakeWeed[playerid] = 0;
Weed[playerid] += 20;
DestroyObject(weedblip[playerid]);
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 699.6259765625, -913.1455078125, 76.373420715332))
{
if(FakeWeed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GROVE, "You've collected 20 grams of weed.");
FakeWeed[playerid] = 0;
Weed[playerid] += 20;
DestroyObject(weedblip[playerid]);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_CREAM, "You are not in a weed field.");
return 1;
}
}