16.07.2014, 01:16
Quote:
|
I didn't want any suggestions. I wanted an awnser on my question. I know zcmd is easier but I don't want to re-make all my cmds into zcmd and sscanf
|
Anyway, it looks like you have only used strtok once on the variable tmp and you are using that for both the playerid and price. I don't exactly know how strtok works, but that looks like it is the cause of the problem.
Код:
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SCM(playerid, COLOR_GRAD1, "USAGE: /sellhouseto [playerid/PartOfName] [price]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(giveplayerid != INVALID_PLAYER_ID)
{
if(!strlen(tmp))
{
SCM(playerid, COLOR_GRAD1, "USAGE: /sellhouseto [playerid/PartOfName] [price]");
return 1;
}
new price,house;
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
house = PlayerInfo[playerid][pHouseKey];
price = strval(tmp);


