YCMD to ZCMD - 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: YCMD to ZCMD (
/showthread.php?tid=577052)
YCMD to ZCMD -
Sn4ke2 - 08.06.2015
hi all, how to move this command from YCMD to ZCMD?
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/lemne", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3, 998.8036,-2166.8545,13.0938))
{
if(JobStep[playerid] == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FFFFFF}Taietor de lemne", "{FFFFFF}Timp: {FF8000}7 Minute\n{FFFFFF}Castig: {FF8000}10.000$","Iesire", "");
skinoriginal[playerid] = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, 16);
JobStep[playerid] = 1;
SendClientMessage(playerid, 0xFFFF00C8, "Urca-te intr-o masina.");
}
else
{
SendClientMessage(playerid, 0xFF0000C8, "Trebuie sa termini sarcina actuala!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFF0000C8, "Nu esti langa vestiar!");
return 1;
}
return 1;
}
return 0;
}
+ REP
Re: YCMD to ZCMD -
DarkLouis - 08.06.2015
This is not YCMD...
So...
PHP код:
CMD:lenme(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3, 998.8036,-2166.8545,13.0938))
{
if(JobStep[playerid] == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FFFFFF}Taietor de lemne", "{FFFFFF}Timp: {FF8000}7 Minute\n{FFFFFF}Castig: {FF8000}10.000$","Iesire", "");
skinoriginal[playerid] = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, 16);
JobStep[playerid] = 1;
SendClientMessage(playerid, 0xFFFF00C8, "Urca-te intr-o masina.");
}
else
{
SendClientMessage(playerid, 0xFF0000C8, "Trebuie sa termini sarcina actuala!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFF0000C8, "Nu esti langa vestiar!");
return 1;
}
return 1;
}
AND NOT IN OnPlayerCommandText
Re: YCMD to ZCMD -
Sn4ke2 - 08.06.2015
it's not work, not put OnPlayerCom..... i make CMD: etc etc
but i have 25 errors
Re: YCMD to ZCMD -
JaydenJason - 08.06.2015
Код:
CMD:lenme(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3, 998.8036,-2166.8545,13.0938))
{
if(JobStep[playerid] == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FFFFFF}Taietor de lemne", "{FFFFFF}Timp: {FF8000}7 Minute\n{FFFFFF}Castig: {FF8000}10.000$","Iesire", "");
skinoriginal[playerid] = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, 16);
JobStep[playerid] = 1;
SendClientMessage(playerid, 0xFFFF00C8, "Urca-te intr-o masina.");
}
else
{
SendClientMessage(playerid, 0xFF0000C8, "Trebuie sa termini sarcina actuala!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFF0000C8, "Nu esti langa vestiar!");
return 1;
}
return 1;
}
Simply change the "if(strcmp..
to CMD:commandname(playerid, params[]), fix the indentation and place it outside of a callback
Re: YCMD to ZCMD -
Sn4ke2 - 08.06.2015
look:
PHP код:
taietordelemne.pwn(439) : warning 203: symbol is never used: "lemne"
Re: YCMD to ZCMD -
Konstantinos - 08.06.2015
Include ZCMD to the script and like I told you to the previous thread, there are a lot tutorials about how to convert to ZCMD or how to even make a command with it. Even with a combination of sscanf.
Just search and most important: read and understand them.