19.10.2011, 02:55
if(strcmp("/plant", cmd, true) == 0)
{
tmp = strtok(cmdtext, idx);
if (!WEEDS[playerid]) return SendClientMessage(playerid, COLOR_GREY," You don't have any Seeds with you.");
if(Weeder[playerid] > 0 && PlayerInfo[playerid][pDonateRank] != 3) return SendClientMessage(playerid, COLOR_GREY,"You recently planted weed, You must wait till the time reduces.");
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GREY,"USAGE: /plant [weed]");
else if (strcmp("weed", tmp, true) == 0)
{
for(new weed = 0; weed < sizeof(WeedInfo); weed++)
{
if(WeedInfo[weed][WeedPlanted] == 0 && WeedInfo[weed][WeedTime] == 0)
{
if (GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return SendClientMessage(playerid, COLOR_GREY, " Your not on foot");
if (GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid, COLOR_GREY, " You must be outside");
if (PlayerInfo[playerid][pJob] != 4) return SendClientMessage(playerid, COLOR_GREY, " You are not a Drugs Dealer !");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerName(playerid, playername, 24);
ApplyAnimation(playerid, "BOMBER","BOM_Plant_In",4.0,0,0,0,0,0);
weedObject[playerid] = CreateStreamObject(3409, X, Y, Z-2, 0, 0, 0, 200.0, 0);
Weeder[playerid] = 1200;
WeedInfo[weed][WeedX] = X;
WeedInfo[weed][WeedY] = Y;
WeedInfo[weed][WeedZ] = Z;
WeedInfo[weed][WeedTime] = 1;
WeedInfo[weed][WeedPlanted] = 1;
strmid(WeedInfo[weed][WeedPlanter], playername, 0, strlen(playername), 50);
SendClientMessage(playerid,COLOR_GREEN,"You have planted your seeds, It will grow into a weed plant in 1 Minutes.");
SendClientMessage(playerid,COLOR_GREEN,"Remember to type /pickweed Before someone else takes your weed!");
WEEDS[playerid]--;
return 1;
}
}
}
else SendClientMessage(playerid, COLOR_GREY,"USAGE: /setweed [foot]");
return 1;
}
This is the command. Object of weed should come up but he wont :X can any of u guys see visual problem?
{
tmp = strtok(cmdtext, idx);
if (!WEEDS[playerid]) return SendClientMessage(playerid, COLOR_GREY," You don't have any Seeds with you.");
if(Weeder[playerid] > 0 && PlayerInfo[playerid][pDonateRank] != 3) return SendClientMessage(playerid, COLOR_GREY,"You recently planted weed, You must wait till the time reduces.");
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GREY,"USAGE: /plant [weed]");
else if (strcmp("weed", tmp, true) == 0)
{
for(new weed = 0; weed < sizeof(WeedInfo); weed++)
{
if(WeedInfo[weed][WeedPlanted] == 0 && WeedInfo[weed][WeedTime] == 0)
{
if (GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return SendClientMessage(playerid, COLOR_GREY, " Your not on foot");
if (GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid, COLOR_GREY, " You must be outside");
if (PlayerInfo[playerid][pJob] != 4) return SendClientMessage(playerid, COLOR_GREY, " You are not a Drugs Dealer !");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerName(playerid, playername, 24);
ApplyAnimation(playerid, "BOMBER","BOM_Plant_In",4.0,0,0,0,0,0);
weedObject[playerid] = CreateStreamObject(3409, X, Y, Z-2, 0, 0, 0, 200.0, 0);
Weeder[playerid] = 1200;
WeedInfo[weed][WeedX] = X;
WeedInfo[weed][WeedY] = Y;
WeedInfo[weed][WeedZ] = Z;
WeedInfo[weed][WeedTime] = 1;
WeedInfo[weed][WeedPlanted] = 1;
strmid(WeedInfo[weed][WeedPlanter], playername, 0, strlen(playername), 50);
SendClientMessage(playerid,COLOR_GREEN,"You have planted your seeds, It will grow into a weed plant in 1 Minutes.");
SendClientMessage(playerid,COLOR_GREEN,"Remember to type /pickweed Before someone else takes your weed!");
WEEDS[playerid]--;
return 1;
}
}
}
else SendClientMessage(playerid, COLOR_GREY,"USAGE: /setweed [foot]");
return 1;
}
This is the command. Object of weed should come up but he wont :X can any of u guys see visual problem?