Little help with variables please...
#7

Quote:
Originally Posted by 22reiko
Посмотреть сообщение
P.s. Can i ask where do you assign the values you input to a variable? Or it somehow understands automatically? I mean..

if (strcmp(cmd, "/skin", true) == 0)
{
tmp = strtok(cmdtext,idx);
IDT = strval(tmp); <---------- This part..
SetPlayerSkin(playerid,IDT);
return 1;
}
As Nero stated above me, that's what sscanf is for. The code you posted (I recommend using [*pawn][*/pawn] tags on the forum) uses strtok, which is a very inefficient way to create your commands.
Reply


Messages In This Thread
Little help with variables please... - by 22reiko - 13.07.2011, 12:41
Re: Little help with variables please... - by Skylar Paul - 13.07.2011, 12:51
Re: Little help with variables please... - by 22reiko - 13.07.2011, 12:53
Re: Little help with variables please... - by Skylar Paul - 13.07.2011, 12:54
Re: Little help with variables please... - by 22reiko - 13.07.2011, 13:46
AW: Little help with variables please... - by Nero_3D - 13.07.2011, 15:04
Re: Little help with variables please... - by Skylar Paul - 13.07.2011, 15:48

Forum Jump:


Users browsing this thread: 1 Guest(s)