09.01.2010, 17:00
Hi
I am using the following command:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/vms", true) == 0)
{
new newvms[256];
newvms = strtok(cmdtext, idx);
Update3DTextLabelText(Text3D:vms, 0xFFFFFFFF, newvms);
return 1;
/* Returning '1' is used to notify the server that the command
has successfully been processed. If you return true here you won't
get that 'SERVER: Unknown Command.', and any conflicts will be
avoided.
*/
}
return 0;
}
it is working fine - however if i put a space in the new string it doesnt work. What needs to be changed?
I am using the following command:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/vms", true) == 0)
{
new newvms[256];
newvms = strtok(cmdtext, idx);
Update3DTextLabelText(Text3D:vms, 0xFFFFFFFF, newvms);
return 1;
/* Returning '1' is used to notify the server that the command
has successfully been processed. If you return true here you won't
get that 'SERVER: Unknown Command.', and any conflicts will be
avoided.
*/
}
return 0;
}
it is working fine - however if i put a space in the new string it doesnt work. What needs to be changed?