20.11.2009, 23:21
jw if some could convert this for me i dont no much about this kinda maths stuff
Код:
irccmd_cmd(conn, channel[], user[], params[]) { if(!IsPlayerOp(conn,channel,user)) return AccessDenied(user); tmp = strtok(cmdtext, idx); new otherplayer = ReturnUser(tmp); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cmd [playerid] [command]"); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cmd [playerid][command]"); if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid,COLOR_WHITE, "Invalid Player ID."); SendRaw(otherplayer, result); return 1; }