After adding sscanf and zcmd to my gm all commands don't work
#1

After i have put new command made with zcmd and sscanf all other commands, made with onplayercommandtext don't work
Reply
#2

I don't think you can mix both, try converting them all to Zcmd.
Reply
#3

lol how to do that? i have dozens of commands
Reply
#4

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;
}
Reply
#5

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.
Reply
#6

Simply undo if you have your script opened or you can re-download your script as it is still uploaded on mediafire.
Reply
#7

ok, i found a solution myself, i used tutorial in samp wiki with strtok
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)