SA-MP Forums Archive
zcmd to dcmd help - 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: zcmd to dcmd help (/showthread.php?tid=302702)



zcmd to dcmd help - scottygraham1990 - 10.12.2011

hi i want to no what the best way to convert zcmd to dcmd as most of my commands are dcmd so if will be easyer to convert to dcmd not zcmd i know zcmd is better but if will take to much work to get all commands from dcmd to zcmd thx


Re: zcmd to dcmd help - MadeMan - 10.12.2011

Actually converting dcmd to zcmd is easier.

Just replace this

pawn Код:
dcmd_somecommand(playerid, params[])
with
pawn Код:
CMD:somecommand(playerid, params[])
and delete these lines from OnPlayerCommandText

pawn Код:
dcmd(somecommand,11,cmdtext);



Re: zcmd to dcmd help - scottygraham1990 - 10.12.2011

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
Actually converting dcmd to zcmd is easier.

Just replace this

pawn Код:
dcmd_somecommand(playerid, params[])
with
pawn Код:
CMD:somecommand(playerid, params[])
and delete these lines from OnPlayerCommandText

pawn Код:
dcmd(somecommand,11,cmdtext);
i have over 150 commands in dcmd thats why i need to convert the rest to dcmd


Re: zcmd to dcmd help - playbox12 - 10.12.2011

Then still converting to ZCMD is really easy, just do this:

CTRL+H in the first field you type: dcmd_
In the second field you type CMD:

Then you press Find and replace. When it's finished go to OnPlayerCommandText and delete the lines said in MadeMan's post. Make sure you backup your script incase something goes wrong.


Re: zcmd to dcmd help - scottygraham1990 - 10.12.2011

Quote:
Originally Posted by playbox12
Посмотреть сообщение
Then still converting to ZCMD is really easy, just do this:

CTRL+H in the first field you type: dcmd_
In the second field you type CMD:

Then you press Find and replace. When it's finished go to OnPlayerCommandText and delete the lines said in MadeMan's post. Make sure you backup your script incase something goes wrong.
ya i did that but it just crashed lol

im trying to convert Lux Admin and i need to convert that but when i did what MadeMan said and it crashes the program


Re: zcmd to dcmd help - scottygraham1990 - 10.12.2011

i now get the errors

C:\Users\Joe\Desktop\new samp\filterscripts\LuxAdmin.pwn(287 : error 029: invalid expression, assumed zero
C:\Users\Joe\Desktop\new samp\filterscripts\LuxAdmin.pwn(287 : error 029: invalid expression, assumed zero
C:\Users\Joe\Desktop\new samp\filterscripts\LuxAdmin.pwn(2879) : warning 209: function "cmd_spawnplayer" should return a value
C:\Users\Joe\Desktop\new samp\filterscripts\LuxAdmin.pwn(4721) : error 029: invalid expression, assumed zero
C:\Users\Joe\Desktop\new samp\filterscripts\LuxAdmin.pwn(4721) : error 029: invalid expression, assumed zero
C:\Users\Joe\Desktop\new samp\filterscripts\LuxAdmin.pwn(4722) : warning 209: function "cmd_warp" should return a value