20.07.2010, 00:40
Hi,
I am having this issue as i'm not quite used to tmp's etc.
However, I would like to make a command for players, to save a players phonenumber and name into a file.
But as you may see, the tmp's are for ID and numbers only.
The numbers saves fine, but i can't figure out how to save the name into a file, as it currently only works for numbers, hence strval(tmp).
I couldn't seem to find the code/function that i am needing.
I am looking forward for your assistance.
Thank you.
I am having this issue as i'm not quite used to tmp's etc.
However, I would like to make a command for players, to save a players phonenumber and name into a file.
But as you may see, the tmp's are for ID and numbers only.
The numbers saves fine, but i can't figure out how to save the name into a file, as it currently only works for numbers, hence strval(tmp).
I couldn't seem to find the code/function that i am needing.
I am looking forward for your assistance.
Thank you.
Код:
if(strcmp(cmd, "/addfavorites", true) == 0) { new tmp[256]; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /AddFavorites [Number] [Name]"); return 1; } new phonenumber = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /AddFavorites [Number] [Name]"); return 1; } new nametext = strval(tmp);