SA-MP Forums Archive
command error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: command error (/showthread.php?tid=543498)



command error - StR_MaRy - 27.10.2014

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 (


Re: command error - SupaVZ - 27.10.2014

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

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


Re: command error - StR_MaRy - 27.10.2014

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

Server: Unknown Command

Why?


Re: command error - SupaVZ - 31.10.2014

Can i see your code please.


Re: command error - VishvaJeet - 31.10.2014

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


Respuesta: command error - !R1Ch@rD! - 31.10.2014

OnPlayerCommandText not used if you use ZCMD