11.06.2010, 16:03
Yo, i made a script for /me; /do and etc. but i got a problem.
The problem is when i type ex."/me grabs his gun from the table" it will say "Firstname_Lastname grabs" instead of "Firstname_Lastname grabs his gun from the table".
It always shows only the first word..
Please tell me where is the problem and how to fix it.
Its maybe very easy but i am still new.
The problem is when i type ex."/me grabs his gun from the table" it will say "Firstname_Lastname grabs" instead of "Firstname_Lastname grabs his gun from the table".
It always shows only the first word..
Код:
if(strcmp("/me", cmd, true) == 0) { new tmp[256]; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [Action]"); new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof name); format(cmdtext, 128, "* %s %s ", name, tmp ); new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); for(new i, m = GetMaxPlayers(); i < m; i++) if (IsPlayerConnected(i)) { if (IsPlayerInRangeOfPoint(i, 15.0, x, y, z)) SendClientMessage(i, COLOR_PURPLE, cmdtext); } return 1; }
Its maybe very easy but i am still new.