After adding sscanf and zcmd to my gm all commands don't work - 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: After adding sscanf and zcmd to my gm all commands don't work (
/showthread.php?tid=348998)
After adding sscanf and zcmd to my gm all commands don't work -
pasha97 - 07.06.2012
After i have put new command made with zcmd and sscanf all other commands, made with onplayercommandtext don't work

Re: After adding sscanf and zcmd to my gm all commands don't work -
Infinity90 - 07.06.2012
I don't think you can mix both, try converting them all to Zcmd.
Re: After adding sscanf and zcmd to my gm all commands don't work -
pasha97 - 07.06.2012
lol how to do that? i have dozens of commands
Re: After adding sscanf and zcmd to my gm all commands don't work -
Infinity90 - 07.06.2012
It will take a lot of time or Convert Your Zcmd's to OnPlayerCommandText
Example
CMD:heal(playerid, params[])
{
SetPlayerHealth(playerid, 100);
return 1;
}
To
if(strcmp("/heal",cmdtext,true,10) == 0)
{
SetPlayerHealth(playerid, 100);
return 1;
}
Re: After adding sscanf and zcmd to my gm all commands don't work -
Mark™ - 07.06.2012
https://sampforum.blast.hk/showthread.php?tid=276063
Quote:
Originally Posted by Infinity90
It will take a lot of time or Convert Your Zcmd's to OnPlayerCommandText
Example
CMD:heal(playerid, params[])
{
SetPlayerHealth(playerid, 100);
return 1;
}
To
if(strcmp("/heal",cmdtext,true,10) == 0)
{
SetPlayerHealth(playerid, 100);
return 1;
}
|
That won't even work in-game and would show "Server:Unknown Command". String count for /heal is 5, not 10.
Re: After adding sscanf and zcmd to my gm all commands don't work -
Gaetic - 07.06.2012
Simply undo if you have your script opened or you can re-download your script as it is still uploaded on mediafire.
Re: After adding sscanf and zcmd to my gm all commands don't work -
pasha97 - 07.06.2012
ok, i found a solution myself, i used tutorial in samp wiki with strtok