30.03.2014, 23:09
pawn Код:
//variavel global
new Float:mpos[4];
if(strcmp(cmd, "/plantarmaconha", true) == 0)
{
if (Seeds[playerid] == 1) {
SendClientMessage(playerid, COLOR_GREEN, "Vocк jб plantou uma semente!");
SetTimerEx("Growingtime", 300000, 0, "i", playerid);
Seeds[playerid] = 0;
GetPlayerFacingAngle(playerid, mpos[3]);
GetPlayerPos(playerid, mpos[0], mpos[1], mpos[2]);
Seeds[playerid] = CreateObject(3409, mpos[0], mpos[1], mpos[2] - 1.3, 0.0, 0.0, mpos[3] + 90);
WantedPoints[playerid]-=1;
SetPlayerCriminal(playerid,255, "Plantaзгo de Maconha");
} else {
SendClientMessage(playerid, COLOR_RED, "[ERRO] Vocк nгo tem sementes!");
}
return 1;
}
if(strcmp(cmd, "/pegarmaconha", true) == 0)
{
if (FakeWeed[playerid] == 1)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, mpos[0], mpos[1], mpos[2]))
{
SendClientMessage(playerid, COLOR_GREEN, "Vocк pegou uma erva!");
FakeWeed[playerid] = 0;
PlayerInfo[playerid][pDrogas] += 1;
}
SendClientMessage(playerid, COLOR_GREEN, "Tas longe!");
}
else SendClientMessage(playerid, COLOR_RED, "[ERRO] Vocк nгo tem alguma erva para pegar!");
return 1;
}