CMD:givecash(playerid, params[]) new targetid, amount; if (sscanf(params, "ui", targetid, amount)) return SendClientMessage(playerid, -1, "Usage: /givecash [player] [amount]"); if (targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Player not found");
While PAWN has a built-in strtok function, it is notoriously slow and cumbersome for complex data extraction. sscanf2 acts as the ; instead of building a string, it deconstructs one.