command error
#1

if(strcmp(cmdtext, "/weed plant", true) == 0)
{
if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return SendClientMessage(playerid, COLOR_GREY, "SERVER: You must be onfoot to perform this command.");
if(WeedInfo[playerid][wAbleToPlant] == true && WeedInfo[playerid][wSeeds] == 1)
{
for(new weed = 0; weed < sizeof(WeedInfo); weed++)
{
new Float:X,Float:Y,Float:Z;
ApplyAnimation(playerid, "BOMBER","BOM_Plant_In",4.0,0,0,0,0,0);
ApplyAnimation(playerid, "BOMBER","BOM_Plant_In",4.0,0,0,0,0,0); // Applying it twice for ensurity
GetPlayerPos(playerid, X, Y, Z);
WeedInfo[weed][wPlantObject] = CreateObject(3409, X, Y, Z-1.0, 0, 0, 0, 0);
WeedInfo[weed][wX] = X;
WeedInfo[weed][wY] = Y;
WeedInfo[weed][wZ] = Z;
WeedInfo[weed][wAbleToPlant] = false;
WeedInfo[weed][wSeeds] = 0;
WeedInfo[weed][wLabel] = Create3DTextLabel("PLANT STATUS: Not ready for picking.",COLOR_SILVER,WeedInfo[weed][wX],WeedInfo[weed][wY],WeedInfo[weed][wZ],10.0,0);
WeedInfo[weed][wLabels]++;
SetTimer("PlantWeedTimer", 20000, 0); // 2 Minute.
SendClientMessage(playerid,COLOR_GREEN,"INFO: You have planted your seeds, it will now grow and be ready to /weed pick in 10 minutes.");
return 1;
}
}
else SendClientMessage(playerid,COLOR_GREY,"INFO: Unable to plant seeds, you already have an active plant to maintain.");
}


why I can not see / weed plant CreateObject when I turn order?

WeedInfo [weed] [wPlantObject] = CreateObject (3409, X, Y, Z, 1.0, 0, 0, 0, 0);


i tried with dynamic but i can't open server with streamer (
Reply
#2

Why you using old verison.. use zcmd its quicker and faster.

Go on here, https://sampforum.blast.hk/showthread.php?tid=91354
Reply
#3

i use this zcmd when i #include <zcmd> all my chat commands , /slap /kick etc...

Server: Unknown Command

Why?
Reply
#4

Can i see your code please.
Reply
#5

Quote:
Originally Posted by StR_MaRy
Посмотреть сообщение
i use this zcmd when i #include <zcmd> all my chat commands , /slap /kick etc...

Server: Unknown Command

Why?
Because you can't use OnPlayerCommandText() & ZCMD in one pwn file

Use OnPlayerCommandText() Or ZCMD
Reply
#6

OnPlayerCommandText not used if you use ZCMD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)